Total Complexity | 254 |
Complexity/F | 6.86 |
Lines of Code | 419 |
Function Count | 37 |
Duplicated Lines | 419 |
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/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 | this["wysihtml5"] = this["wysihtml5"] || {}; |
|
|
|||
2 | this["wysihtml5"]["tpl"] = this["wysihtml5"]["tpl"] || {}; |
||
3 | |||
4 | this["wysihtml5"]["tpl"]["blockquote"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
5 | this.compilerInfo = [4,'>= 1.0.0']; |
||
6 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
7 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
8 | |||
9 | function program1(depth0,data) { |
||
10 | |||
11 | var buffer = "", stack1; |
||
12 | buffer += "btn-" |
||
13 | + 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)); |
||
14 | return buffer; |
||
15 | } |
||
16 | |||
17 | function program3(depth0,data) { |
||
18 | |||
19 | |||
20 | return " \n <span class=\"fa fa-quote-left\"></span>\n "; |
||
21 | } |
||
22 | |||
23 | function program5(depth0,data) { |
||
24 | |||
25 | |||
26 | return "\n <span class=\"glyphicon glyphicon-quote\"></span>\n "; |
||
27 | } |
||
28 | |||
29 | buffer += "<li>\n <a class=\"btn "; |
||
30 | 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}); |
||
31 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
32 | buffer += " btn-default\" data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"blockquote\" data-wysihtml5-display-format-name=\"false\" tabindex=\"-1\">\n "; |
||
33 | 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}); |
||
34 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
35 | buffer += "\n </a>\n</li>\n"; |
||
36 | return buffer; |
||
37 | }); |
||
38 | |||
39 | this["wysihtml5"]["tpl"]["color"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
40 | this.compilerInfo = [4,'>= 1.0.0']; |
||
41 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
42 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
43 | |||
44 | function program1(depth0,data) { |
||
45 | |||
46 | var buffer = "", stack1; |
||
47 | buffer += "btn-" |
||
48 | + 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)); |
||
49 | return buffer; |
||
50 | } |
||
51 | |||
52 | buffer += "<li class=\"dropdown\">\n <a class=\"btn btn-default dropdown-toggle "; |
||
53 | 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}); |
||
54 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
55 | buffer += "\" data-toggle=\"dropdown\" tabindex=\"-1\">\n <span class=\"current-color\">" |
||
56 | + 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)) |
||
57 | + "</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\">" |
||
58 | + 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)) |
||
59 | + "</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\">" |
||
60 | + 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)) |
||
61 | + "</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\">" |
||
62 | + 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)) |
||
63 | + "</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\">" |
||
64 | + 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)) |
||
65 | + "</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\">" |
||
66 | + 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)) |
||
67 | + "</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\">" |
||
68 | + 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)) |
||
69 | + "</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\">" |
||
70 | + 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)) |
||
71 | + "</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\">" |
||
72 | + 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)) |
||
73 | + "</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\">" |
||
74 | + 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)) |
||
75 | + "</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\">" |
||
76 | + 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)) |
||
77 | + "</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\">" |
||
78 | + 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)) |
||
79 | + "</a></li>\n </ul>\n</li>\n"; |
||
80 | return buffer; |
||
81 | }); |
||
82 | |||
83 | this["wysihtml5"]["tpl"]["emphasis"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
84 | this.compilerInfo = [4,'>= 1.0.0']; |
||
85 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
86 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
87 | |||
88 | function program1(depth0,data) { |
||
89 | |||
90 | var buffer = "", stack1; |
||
91 | buffer += "btn-" |
||
92 | + 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)); |
||
93 | return buffer; |
||
94 | } |
||
95 | |||
96 | function program3(depth0,data) { |
||
97 | |||
98 | var buffer = "", stack1; |
||
99 | buffer += "\n <a class=\"btn "; |
||
100 | 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}); |
||
101 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
102 | buffer += " btn-default\" data-wysihtml5-command=\"small\" title=\"CTRL+S\" tabindex=\"-1\">" |
||
103 | + 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)) |
||
104 | + "</a>\n "; |
||
105 | return buffer; |
||
106 | } |
||
107 | |||
108 | buffer += "<li>\n <div class=\"btn-group\">\n <a class=\"btn "; |
||
109 | 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}); |
||
110 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
111 | buffer += " btn-default\" data-wysihtml5-command=\"bold\" title=\"CTRL+B\" tabindex=\"-1\">" |
||
112 | + 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)) |
||
113 | + "</a>\n <a class=\"btn "; |
||
114 | 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}); |
||
115 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
116 | buffer += " btn-default\" data-wysihtml5-command=\"italic\" title=\"CTRL+I\" tabindex=\"-1\">" |
||
117 | + 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)) |
||
118 | + "</a>\n <a class=\"btn "; |
||
119 | 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}); |
||
120 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
121 | buffer += " btn-default\" data-wysihtml5-command=\"underline\" title=\"CTRL+U\" tabindex=\"-1\">" |
||
122 | + 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)) |
||
123 | + "</a>\n "; |
||
124 | 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}); |
||
125 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
126 | buffer += "\n </div>\n</li>\n"; |
||
127 | return buffer; |
||
128 | }); |
||
129 | |||
130 | this["wysihtml5"]["tpl"]["font-styles"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
131 | this.compilerInfo = [4,'>= 1.0.0']; |
||
132 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
133 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
134 | |||
135 | function program1(depth0,data) { |
||
136 | |||
137 | var buffer = "", stack1; |
||
138 | buffer += "btn-" |
||
139 | + 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)); |
||
140 | return buffer; |
||
141 | } |
||
142 | |||
143 | function program3(depth0,data) { |
||
144 | |||
145 | |||
146 | return "\n <span class=\"fa fa-font\"></span>\n "; |
||
147 | } |
||
148 | |||
149 | function program5(depth0,data) { |
||
150 | |||
151 | |||
152 | return "\n <span class=\"glyphicon glyphicon-font\"></span>\n "; |
||
153 | } |
||
154 | |||
155 | buffer += "<li class=\"dropdown\">\n <a class=\"btn btn-default dropdown-toggle "; |
||
156 | 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}); |
||
157 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
158 | buffer += "\" data-toggle=\"dropdown\">\n "; |
||
159 | 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}); |
||
160 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
161 | buffer += "\n <span class=\"current-font\">" |
||
162 | + 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)) |
||
163 | + "</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\">" |
||
164 | + 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)) |
||
165 | + "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h1\" tabindex=\"-1\">" |
||
166 | + 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)) |
||
167 | + "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h2\" tabindex=\"-1\">" |
||
168 | + 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)) |
||
169 | + "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h3\" tabindex=\"-1\">" |
||
170 | + 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)) |
||
171 | + "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h4\" tabindex=\"-1\">" |
||
172 | + 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)) |
||
173 | + "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h5\" tabindex=\"-1\">" |
||
174 | + 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)) |
||
175 | + "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h6\" tabindex=\"-1\">" |
||
176 | + 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)) |
||
177 | + "</a></li>\n </ul>\n</li>\n"; |
||
178 | return buffer; |
||
179 | }); |
||
180 | |||
181 | this["wysihtml5"]["tpl"]["html"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
182 | this.compilerInfo = [4,'>= 1.0.0']; |
||
183 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
184 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
185 | |||
186 | function program1(depth0,data) { |
||
187 | |||
188 | var buffer = "", stack1; |
||
189 | buffer += "btn-" |
||
190 | + 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)); |
||
191 | return buffer; |
||
192 | } |
||
193 | |||
194 | function program3(depth0,data) { |
||
195 | |||
196 | |||
197 | return "\n <span class=\"fa fa-pencil\"></span>\n "; |
||
198 | } |
||
199 | |||
200 | function program5(depth0,data) { |
||
201 | |||
202 | |||
203 | return "\n <span class=\"glyphicon glyphicon-pencil\"></span>\n "; |
||
204 | } |
||
205 | |||
206 | buffer += "<li>\n <div class=\"btn-group\">\n <a class=\"btn "; |
||
207 | 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}); |
||
208 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
209 | buffer += " btn-default\" data-wysihtml5-action=\"change_view\" title=\"" |
||
210 | + 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)) |
||
211 | + "\" tabindex=\"-1\">\n "; |
||
212 | 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}); |
||
213 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
214 | buffer += "\n </a>\n </div>\n</li>\n"; |
||
215 | return buffer; |
||
216 | }); |
||
217 | |||
218 | this["wysihtml5"]["tpl"]["image"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
219 | this.compilerInfo = [4,'>= 1.0.0']; |
||
220 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
221 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
222 | |||
223 | function program1(depth0,data) { |
||
224 | |||
225 | |||
226 | return "modal-sm"; |
||
227 | } |
||
228 | |||
229 | function program3(depth0,data) { |
||
230 | |||
231 | var buffer = "", stack1; |
||
232 | buffer += "btn-" |
||
233 | + 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)); |
||
234 | return buffer; |
||
235 | } |
||
236 | |||
237 | function program5(depth0,data) { |
||
238 | |||
239 | |||
240 | return "\n <span class=\"fa fa-file-image-o\"></span>\n "; |
||
241 | } |
||
242 | |||
243 | function program7(depth0,data) { |
||
244 | |||
245 | |||
246 | return "\n <span class=\"glyphicon glyphicon-picture\"></span>\n "; |
||
247 | } |
||
248 | |||
249 | buffer += "<li>\n <div class=\"bootstrap-wysihtml5-insert-image-modal modal fade\" data-wysihtml5-dialog=\"insertImage\">\n <div class=\"modal-dialog "; |
||
250 | 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}); |
||
251 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
252 | buffer += "\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <a class=\"close\" data-dismiss=\"modal\">×</a>\n <h3>" |
||
253 | + 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)) |
||
254 | + "</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=\"#\">" |
||
255 | + 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)) |
||
256 | + "</a>\n <a class=\"btn btn-primary\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"save\" href=\"#\">" |
||
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 | + "</a>\n </div>\n </div>\n </div>\n </div>\n <a class=\"btn "; |
||
259 | 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}); |
||
260 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
261 | buffer += " btn-default\" data-wysihtml5-command=\"insertImage\" title=\"" |
||
262 | + 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)) |
||
263 | + "\" tabindex=\"-1\">\n "; |
||
264 | 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}); |
||
265 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
266 | buffer += "\n </a>\n</li>\n"; |
||
267 | return buffer; |
||
268 | }); |
||
269 | |||
270 | this["wysihtml5"]["tpl"]["link"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
271 | this.compilerInfo = [4,'>= 1.0.0']; |
||
272 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
273 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
274 | |||
275 | function program1(depth0,data) { |
||
276 | |||
277 | |||
278 | return "modal-sm"; |
||
279 | } |
||
280 | |||
281 | function program3(depth0,data) { |
||
282 | |||
283 | var buffer = "", stack1; |
||
284 | buffer += "btn-" |
||
285 | + 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)); |
||
286 | return buffer; |
||
287 | } |
||
288 | |||
289 | function program5(depth0,data) { |
||
290 | |||
291 | |||
292 | return "\n <span class=\"fa fa-share-square-o\"></span>\n "; |
||
293 | } |
||
294 | |||
295 | function program7(depth0,data) { |
||
296 | |||
297 | |||
298 | return "\n <span class=\"glyphicon glyphicon-share\"></span>\n "; |
||
299 | } |
||
300 | |||
301 | buffer += "<li>\n <div class=\"bootstrap-wysihtml5-insert-link-modal modal fade\" data-wysihtml5-dialog=\"createLink\">\n <div class=\"modal-dialog "; |
||
302 | 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}); |
||
303 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
304 | buffer += "\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <a class=\"close\" data-dismiss=\"modal\">×</a>\n <h3>" |
||
305 | + 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)) |
||
306 | + "</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>" |
||
307 | + 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)) |
||
308 | + "\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=\"#\">" |
||
309 | + 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)) |
||
310 | + "</a>\n <a href=\"#\" class=\"btn btn-primary\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"save\">" |
||
311 | + 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)) |
||
312 | + "</a>\n </div>\n </div>\n </div>\n </div>\n <a class=\"btn "; |
||
313 | 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}); |
||
314 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
315 | buffer += " btn-default\" data-wysihtml5-command=\"createLink\" title=\"" |
||
316 | + 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)) |
||
317 | + "\" tabindex=\"-1\">\n "; |
||
318 | 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}); |
||
319 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
320 | buffer += "\n </a>\n</li>\n"; |
||
321 | return buffer; |
||
322 | }); |
||
323 | |||
324 | this["wysihtml5"]["tpl"]["lists"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
325 | this.compilerInfo = [4,'>= 1.0.0']; |
||
326 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
327 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
328 | |||
329 | function program1(depth0,data) { |
||
330 | |||
331 | var buffer = "", stack1; |
||
332 | buffer += "btn-" |
||
333 | + 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)); |
||
334 | return buffer; |
||
335 | } |
||
336 | |||
337 | function program3(depth0,data) { |
||
338 | |||
339 | |||
340 | return "\n <span class=\"fa fa-list-ul\"></span>\n "; |
||
341 | } |
||
342 | |||
343 | function program5(depth0,data) { |
||
344 | |||
345 | |||
346 | return "\n <span class=\"glyphicon glyphicon-list\"></span>\n "; |
||
347 | } |
||
348 | |||
349 | function program7(depth0,data) { |
||
350 | |||
351 | |||
352 | return "\n <span class=\"fa fa-list-ol\"></span>\n "; |
||
353 | } |
||
354 | |||
355 | function program9(depth0,data) { |
||
356 | |||
357 | |||
358 | return "\n <span class=\"glyphicon glyphicon-th-list\"></span>\n "; |
||
359 | } |
||
360 | |||
361 | function program11(depth0,data) { |
||
362 | |||
363 | |||
364 | return "\n <span class=\"fa fa-outdent\"></span>\n "; |
||
365 | } |
||
366 | |||
367 | function program13(depth0,data) { |
||
368 | |||
369 | |||
370 | return "\n <span class=\"glyphicon glyphicon-indent-right\"></span>\n "; |
||
371 | } |
||
372 | |||
373 | function program15(depth0,data) { |
||
374 | |||
375 | |||
376 | return "\n <span class=\"fa fa-indent\"></span>\n "; |
||
377 | } |
||
378 | |||
379 | function program17(depth0,data) { |
||
380 | |||
381 | |||
382 | return "\n <span class=\"glyphicon glyphicon-indent-left\"></span>\n "; |
||
383 | } |
||
384 | |||
385 | buffer += "<li>\n <div class=\"btn-group\">\n <a class=\"btn "; |
||
386 | 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}); |
||
387 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
388 | buffer += " btn-default\" data-wysihtml5-command=\"insertUnorderedList\" title=\"" |
||
389 | + 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)) |
||
390 | + "\" tabindex=\"-1\">\n "; |
||
391 | 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}); |
||
392 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
393 | buffer += "\n </a>\n <a class=\"btn "; |
||
394 | 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}); |
||
395 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
396 | buffer += " btn-default\" data-wysihtml5-command=\"insertOrderedList\" title=\"" |
||
397 | + 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)) |
||
398 | + "\" tabindex=\"-1\">\n "; |
||
399 | 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}); |
||
400 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
401 | buffer += "\n </a>\n <a class=\"btn "; |
||
402 | 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}); |
||
403 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
404 | buffer += " btn-default\" data-wysihtml5-command=\"Outdent\" title=\"" |
||
405 | + 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)) |
||
406 | + "\" tabindex=\"-1\">\n "; |
||
407 | 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}); |
||
408 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
409 | buffer += "\n </a>\n <a class=\"btn "; |
||
410 | 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}); |
||
411 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
412 | buffer += " btn-default\" data-wysihtml5-command=\"Indent\" title=\"" |
||
413 | + 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)) |
||
414 | + "\" tabindex=\"-1\">\n "; |
||
415 | 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}); |
||
416 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
417 | buffer += "\n </a>\n </div>\n</li>\n"; |
||
418 | return buffer; |
||
419 | }); |