8 "Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" + |
8 "Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" + |
9 "Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" + |
9 "Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" + |
10 "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; |
10 "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; |
11 |
11 |
12 var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"; |
12 var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"; |
13 var defaultMeasurement = "+pixels=px;points=pt;em;in;cm;mm;picas;ems;exs;%"; |
13 var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; |
14 var defaultSpacingMeasurement = "pixels=px;points=pt;in;cm;mm;picas;+ems;exs;%"; |
14 var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%"; |
15 var defaultIndentMeasurement = "pixels=px;+points=pt;in;cm;mm;picas;ems;exs;%"; |
15 var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; |
16 var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900"; |
16 var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900"; |
17 var defaultTextStyle = "normal;italic;oblique"; |
17 var defaultTextStyle = "normal;italic;oblique"; |
18 var defaultVariant = "normal;small-caps"; |
18 var defaultVariant = "normal;small-caps"; |
19 var defaultLineHeight = "normal"; |
19 var defaultLineHeight = "normal"; |
20 var defaultAttachment = "fixed;scroll"; |
20 var defaultAttachment = "fixed;scroll"; |
245 |
245 |
246 // setupBox(f, ce, '', 'border', 'Color'); |
246 // setupBox(f, ce, '', 'border', 'Color'); |
247 } |
247 } |
248 |
248 |
249 function getMeasurement(s) { |
249 function getMeasurement(s) { |
250 return s.replace(/^([0-9]+)(.*)$/, "$2"); |
250 return s.replace(/^([0-9.]+)(.*)$/, "$2"); |
251 } |
251 } |
252 |
252 |
253 function getNum(s) { |
253 function getNum(s) { |
254 if (new RegExp('^[0-9]+[a-z%]+$', 'gi').test(s)) |
254 if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s)) |
255 return s.replace(/[^0-9]/g, ''); |
255 return s.replace(/[^0-9.]/g, ''); |
256 |
256 |
257 return s; |
257 return s; |
258 } |
258 } |
259 |
259 |
260 function inStr(s, n) { |
260 function inStr(s, n) { |
476 ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); |
476 ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); |
477 ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : ""); |
477 ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : ""); |
478 ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : ""); |
478 ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : ""); |
479 ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : ""); |
479 ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : ""); |
480 } else |
480 } else |
481 ce.style.borderWidth = f.border_width_top.value; |
481 ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); |
482 |
482 |
483 if (!f.border_color_same.checked) { |
483 if (!f.border_color_same.checked) { |
484 ce.style.borderTopColor = f.border_color_top.value; |
484 ce.style.borderTopColor = f.border_color_top.value; |
485 ce.style.borderRightColor = f.border_color_right.value; |
485 ce.style.borderRightColor = f.border_color_right.value; |
486 ce.style.borderBottomColor = f.border_color_bottom.value; |
486 ce.style.borderBottomColor = f.border_color_bottom.value; |