fume 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/VERSION.yml +1 -1
  2. data/fume.gemspec +12 -35
  3. data/generators/fume/simple_theme/templates/public/demo.html +42 -6
  4. data/generators/fume/simple_theme/templates/public/javascripts/jquery.corner-2.03.js +203 -0
  5. data/generators/fume/simple_theme/templates/public/javascripts/jquery.timepicker-0.2.1.js +413 -0
  6. data/generators/fume/simple_theme/templates/public/javascripts/simple-theme-ie-patch.js +19 -0
  7. data/generators/fume/simple_theme/templates/public/stylesheets/simple-theme.css +122 -175
  8. data/generators/fume/simple_theme/templates/public/stylesheets/simple-theme.less +21 -3
  9. data/generators/fume/simple_theme/templates/public/stylesheets/src/base.less +9 -0
  10. data/generators/fume/simple_theme/templates/public/stylesheets/src/function.less +17 -0
  11. data/generators/fume/simple_theme/templates/public/stylesheets/{layout.less → src/layout.less} +30 -11
  12. data/generators/fume/simple_theme/templates/public/stylesheets/src/reset.less +18 -0
  13. data/generators/fume/simple_theme/templates/public/stylesheets/src/vendor/yui-3.0/base.css +80 -0
  14. data/generators/fume/simple_theme/templates/public/stylesheets/src/vendor/yui-3.0/fonts.css +47 -0
  15. data/generators/fume/simple_theme/templates/public/stylesheets/src/vendor/yui-3.0/reset.css +126 -0
  16. metadata +12 -35
  17. data/generators/fume/simple_theme/templates/public/stylesheets/base.less +0 -49
  18. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/ie.css +0 -27
  19. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/buttons/icons/cross.png +0 -0
  20. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/buttons/icons/key.png +0 -0
  21. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/buttons/icons/tick.png +0 -0
  22. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/buttons/readme.txt +0 -32
  23. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/buttons/screen.css +0 -97
  24. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/fancy-type/readme.txt +0 -14
  25. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/fancy-type/screen.css +0 -71
  26. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/doc.png +0 -0
  27. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/email.png +0 -0
  28. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/external.png +0 -0
  29. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/feed.png +0 -0
  30. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/im.png +0 -0
  31. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/pdf.png +0 -0
  32. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/visited.png +0 -0
  33. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/xls.png +0 -0
  34. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/readme.txt +0 -18
  35. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/screen.css +0 -40
  36. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/rtl/readme.txt +0 -10
  37. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/rtl/screen.css +0 -109
  38. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/print.css +0 -30
  39. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/screen.css +0 -251
  40. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/forms.css +0 -49
  41. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/grid.css +0 -269
  42. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/grid.png +0 -0
  43. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/ie.css +0 -61
  44. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/print.css +0 -85
  45. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/reset.css +0 -38
  46. data/generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/typography.css +0 -105
  47. data/generators/fume/simple_theme/templates/public/stylesheets/drastic-dark.less +0 -0
  48. data/generators/fume/simple_theme/templates/public/stylesheets/ie_patch.less +0 -4
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :build:
3
3
  :minor: 2
4
- :patch: 1
4
+ :patch: 2
5
5
  :major: 0
data/fume.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fume}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sunteya"]
12
- s.date = %q{2009-12-18}
12
+ s.date = %q{2009-12-21}
13
13
  s.email = %q{Sunteya@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "README"
@@ -43,42 +43,19 @@ Gem::Specification.new do |s|
43
43
  "generators/fume/simple_theme/templates/public/javascripts/jquery-1.3.2.js",
44
44
  "generators/fume/simple_theme/templates/public/javascripts/jquery-ui-1.7.2.js",
45
45
  "generators/fume/simple_theme/templates/public/javascripts/jquery-ui-i18n-1.7.2.js",
46
- "generators/fume/simple_theme/templates/public/stylesheets/base.less",
47
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/ie.css",
48
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/buttons/icons/cross.png",
49
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/buttons/icons/key.png",
50
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/buttons/icons/tick.png",
51
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/buttons/readme.txt",
52
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/buttons/screen.css",
53
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/fancy-type/readme.txt",
54
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/fancy-type/screen.css",
55
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/doc.png",
56
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/email.png",
57
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/external.png",
58
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/feed.png",
59
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/im.png",
60
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/pdf.png",
61
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/visited.png",
62
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/icons/xls.png",
63
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/readme.txt",
64
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/link-icons/screen.css",
65
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/rtl/readme.txt",
66
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/plugins/rtl/screen.css",
67
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/print.css",
68
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/screen.css",
69
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/forms.css",
70
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/grid.css",
71
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/grid.png",
72
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/ie.css",
73
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/print.css",
74
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/reset.css",
75
- "generators/fume/simple_theme/templates/public/stylesheets/blueprint-0.9.1/src/typography.css",
76
- "generators/fume/simple_theme/templates/public/stylesheets/drastic-dark.less",
77
- "generators/fume/simple_theme/templates/public/stylesheets/ie_patch.less",
46
+ "generators/fume/simple_theme/templates/public/javascripts/jquery.corner-2.03.js",
47
+ "generators/fume/simple_theme/templates/public/javascripts/jquery.timepicker-0.2.1.js",
48
+ "generators/fume/simple_theme/templates/public/javascripts/simple-theme-ie-patch.js",
78
49
  "generators/fume/simple_theme/templates/public/stylesheets/jquery-ui-1.7.2.ui-darkness.css",
79
- "generators/fume/simple_theme/templates/public/stylesheets/layout.less",
80
50
  "generators/fume/simple_theme/templates/public/stylesheets/simple-theme.css",
81
51
  "generators/fume/simple_theme/templates/public/stylesheets/simple-theme.less",
52
+ "generators/fume/simple_theme/templates/public/stylesheets/src/base.less",
53
+ "generators/fume/simple_theme/templates/public/stylesheets/src/function.less",
54
+ "generators/fume/simple_theme/templates/public/stylesheets/src/layout.less",
55
+ "generators/fume/simple_theme/templates/public/stylesheets/src/reset.less",
56
+ "generators/fume/simple_theme/templates/public/stylesheets/src/vendor/yui-3.0/base.css",
57
+ "generators/fume/simple_theme/templates/public/stylesheets/src/vendor/yui-3.0/fonts.css",
58
+ "generators/fume/simple_theme/templates/public/stylesheets/src/vendor/yui-3.0/reset.css",
82
59
  "init.rb",
83
60
  "lib/fume.rb",
84
61
  "lib/fume/authlogic.rb",
@@ -3,7 +3,42 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
5
  <title>Web App Theme</title>
6
+ <link rel="stylesheet" href="stylesheets/jquery-ui-1.7.2.ui-darkness.css" type="text/css" media="screen" charset="utf-8">
6
7
  <link rel="stylesheet" href="stylesheets/simple-theme.css" type="text/css" media="screen" />
8
+
9
+ <script type="text/javascript" charset="utf-8" src="javascripts/jquery-1.3.2.js"></script>
10
+ <script type="text/javascript" charset="utf-8" src="javascripts/jquery-ui-1.7.2.js"></script>
11
+ <script type="text/javascript" charset="utf-8" src="javascripts/jquery-ui-i18n-1.7.2.js"></script>
12
+ <script type="text/javascript" charset="utf-8" src="javascripts/jquery.corner-2.03.js"></script>
13
+ <script type="text/javascript" charset="utf-8" src="javascripts/jquery.timepicker-0.2.1.js"></script>
14
+ <script type="text/javascript" charset="utf-8" src="javascripts/simple-theme-ie-patch.js"></script>
15
+ <script type="text/javascript" charset="utf-8">
16
+ $(function() {
17
+ $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
18
+
19
+ $('.datepicker').datepicker({
20
+ changeMonth: true,
21
+ changeYear: true,
22
+ showButtonPanel: true,
23
+ duration: 0,
24
+ dateFormat: 'yy-mm-dd'
25
+ });
26
+
27
+ $('.datetimepicker').datepicker({
28
+ changeMonth: true,
29
+ changeYear: true,
30
+ dateFormat: 'yy-mm-dd',
31
+ duration: 0,
32
+ showTime: true,
33
+ constrainInput: false,
34
+ // stepMinutes: 1,
35
+ // stepHours: 1,
36
+ time24h: true
37
+ });
38
+ $("#ui-timepicker-div table th:first").text("时");
39
+ $("#ui-timepicker-div table th:last").text("分");
40
+ });
41
+ </script>
7
42
  </head>
8
43
  <body class="sidebar">
9
44
  <div id="container">
@@ -77,7 +112,7 @@
77
112
  <div class="content">
78
113
  <h2 class="title">Tables</h2>
79
114
  <div class="inner">
80
- <form action="#" class="form">
115
+ <!-- <form action="#" class="form"> -->
81
116
  <table class="table">
82
117
  <tr>
83
118
  <th class="first"><input type="checkbox" class="checkbox toggle" /></th>
@@ -102,14 +137,15 @@
102
137
  </table>
103
138
  <div class="actions-bar">
104
139
  <div class="actions">
105
- <input type="submit" class="button" value="Delete" />
140
+ <!-- <input type="submit" class="button" value="Delete" /> -->
141
+ <a href="#">New Account</a>
106
142
  </div>
107
143
  <div class="pagination">
108
144
  <span class="disabled prev_page">« Previous</span><span class="current">1</span><a rel="next" href="#">2</a><a href="#">3</a><a href="#">4</a><a href="#">5</a><a href="#">6</a><a href="#">7</a><a href="#">8</a><a href="#">9</a><a href="#">10</a><a href="#">11</a><a rel="next" class="next_page" href="#">Next »</a>
109
145
  </div>
110
146
  <div class="clear"></div>
111
147
  </div>
112
- </form>
148
+ <!-- </form> -->
113
149
  </div>
114
150
  </div>
115
151
  </div>
@@ -267,9 +303,9 @@
267
303
  <fieldset class="inputs"><legend><span>影片信息</span></legend><ol>
268
304
 
269
305
  <li class="string required error" id="vod_program_title_input"><label for="vod_program_title">节目名称<abbr title="required">*</abbr></label><input id="vod_program_title" maxlength="100" name="vod_program[title]" size="50" type="text" /><p class="inline-errors">不能为空字符</p></li>
270
- <li class="string optional" id="vod_program_player_input"><label for="vod_program_player">主演</label><input id="vod_program_player" maxlength="200" name="vod_program[player]" size="50" type="text" /><p class="inline-hints">刘嘉玲, 张曼玉</p></li>
271
- <li class="string required" id="vod_program_director_input"><label for="vod_program_director">导演<abbr title="required">*</abbr></label><input id="vod_program_director" maxlength="200" name="vod_program[director]" size="50" type="text" /></li>
272
- <li class="string optional" id="vod_program_company_input"><label for="vod_program_company">出品公司</label><input id="vod_program_company" maxlength="200" name="vod_program[company]" size="50" type="text" /></li>
306
+ <li class="string optional" id="vod_program_player_input"><label for="vod_program_player">主演</label><input id="vod_program_player" class="datepicker" maxlength="200" name="vod_program[player]" size="50" type="text" /><p class="inline-hints">刘嘉玲, 张曼玉</p></li>
307
+ <li class="string required" id="vod_program_director_input"><label for="vod_program_director">导演<abbr title="required">*</abbr></label><input class="datetimepicker" id="vod_program_director" maxlength="200" name="vod_program[director]" size="50" type="text" /></li>
308
+ <li class="string optional" id="vod_program_company_input"><label for="vod_program_company">出品公司</label><input id="vod_program_company" class="datetimepicker" maxlength="200" name="vod_program[company]" size="50" type="text" /></li>
273
309
  <li class="string optional" id="vod_program_country_input"><label for="vod_program_country">出品国家</label><input id="vod_program_country" maxlength="100" name="vod_program[country]" size="50" type="text" /></li>
274
310
  <li class="text optional" id="vod_program_summary_input"><label for="vod_program_summary">节目概要</label><textarea cols="40" id="vod_program_summary" name="vod_program[summary]" rows="20"></textarea><p class="inline-hints">在浩瀚的海洋世界,各种鲨鱼和鱼类有自己的喜怒哀乐,演绎着令人思索的故事。</p></li>
275
311
 
@@ -0,0 +1,203 @@
1
+ /*!
2
+ * jQuery corner plugin: simple corner rounding
3
+ * Examples and documentation at: http://jquery.malsup.com/corner/
4
+ * version 2.03 (05-DEC-2009)
5
+ * Dual licensed under the MIT and GPL licenses:
6
+ * http://www.opensource.org/licenses/mit-license.php
7
+ * http://www.gnu.org/licenses/gpl.html
8
+ */
9
+
10
+ /**
11
+ * corner() takes a single string argument: $('#myDiv').corner("effect corners width")
12
+ *
13
+ * effect: name of the effect to apply, such as round, bevel, notch, bite, etc (default is round).
14
+ * corners: one or more of: top, bottom, tr, tl, br, or bl.
15
+ * by default, all four corners are adorned.
16
+ * width: width of the effect; in the case of rounded corners this is the radius.
17
+ * specify this value using the px suffix such as 10px (and yes, it must be pixels).
18
+ *
19
+ * @author Dave Methvin (http://methvin.com/jquery/jq-corner.html)
20
+ * @author Mike Alsup (http://jquery.malsup.com/corner/)
21
+ */
22
+ ;(function($) {
23
+
24
+ var ua = navigator.userAgent;
25
+ var moz = $.browser.mozilla && /gecko/i.test(ua);
26
+ var webkit = $.browser.safari && /Safari\/[5-9]/.test(ua);
27
+
28
+ var expr = $.browser.msie && (function() {
29
+ var div = document.createElement('div');
30
+ try { div.style.setExpression('width','0+0'); div.style.removeExpression('width'); }
31
+ catch(e) { return false; }
32
+ return true;
33
+ })();
34
+
35
+ function sz(el, p) {
36
+ return parseInt($.css(el,p))||0;
37
+ };
38
+ function hex2(s) {
39
+ var s = parseInt(s).toString(16);
40
+ return ( s.length < 2 ) ? '0'+s : s;
41
+ };
42
+ function gpc(node) {
43
+ for ( ; node && node.nodeName.toLowerCase() != 'html'; node = node.parentNode ) {
44
+ var v = $.css(node,'backgroundColor');
45
+ if (v == 'rgba(0, 0, 0, 0)')
46
+ continue; // webkit
47
+ if (v.indexOf('rgb') >= 0) {
48
+ var rgb = v.match(/\d+/g);
49
+ return '#'+ hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]);
50
+ }
51
+ if ( v && v != 'transparent' )
52
+ return v;
53
+ }
54
+ return '#ffffff';
55
+ };
56
+
57
+ function getWidth(fx, i, width) {
58
+ switch(fx) {
59
+ case 'round': return Math.round(width*(1-Math.cos(Math.asin(i/width))));
60
+ case 'cool': return Math.round(width*(1+Math.cos(Math.asin(i/width))));
61
+ case 'sharp': return Math.round(width*(1-Math.cos(Math.acos(i/width))));
62
+ case 'bite': return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));
63
+ case 'slide': return Math.round(width*(Math.atan2(i,width/i)));
64
+ case 'jut': return Math.round(width*(Math.atan2(width,(width-i-1))));
65
+ case 'curl': return Math.round(width*(Math.atan(i)));
66
+ case 'tear': return Math.round(width*(Math.cos(i)));
67
+ case 'wicked': return Math.round(width*(Math.tan(i)));
68
+ case 'long': return Math.round(width*(Math.sqrt(i)));
69
+ case 'sculpt': return Math.round(width*(Math.log((width-i-1),width)));
70
+ case 'dog': return (i&1) ? (i+1) : width;
71
+ case 'dog2': return (i&2) ? (i+1) : width;
72
+ case 'dog3': return (i&3) ? (i+1) : width;
73
+ case 'fray': return (i%2)*width;
74
+ case 'notch': return width;
75
+ case 'bevel': return i+1;
76
+ }
77
+ };
78
+
79
+ $.fn.corner = function(options) {
80
+ // in 1.3+ we can fix mistakes with the ready state
81
+ if (this.length == 0) {
82
+ if (!$.isReady && this.selector) {
83
+ var s = this.selector, c = this.context;
84
+ $(function() {
85
+ $(s,c).corner(options);
86
+ });
87
+ }
88
+ return this;
89
+ }
90
+
91
+ return this.each(function(index){
92
+ var $this = $(this);
93
+ var o = [ options || '', $this.attr($.fn.corner.defaults.metaAttr) || ''].join(' ').toLowerCase();
94
+ //var o = (options || $this.attr($.fn.corner.defaults.metaAttr) || '').toLowerCase();
95
+ var keep = /keep/.test(o); // keep borders?
96
+ var cc = ((o.match(/cc:(#[0-9a-f]+)/)||[])[1]); // corner color
97
+ var sc = ((o.match(/sc:(#[0-9a-f]+)/)||[])[1]); // strip color
98
+ var width = parseInt((o.match(/(\d+)px/)||[])[1]) || 10; // corner width
99
+ var re = /round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;
100
+ var fx = ((o.match(re)||['round'])[0]);
101
+ var edges = { T:0, B:1 };
102
+ var opts = {
103
+ TL: /top|tl|left/.test(o), TR: /top|tr|right/.test(o),
104
+ BL: /bottom|bl|left/.test(o), BR: /bottom|br|right/.test(o)
105
+ };
106
+ if ( !opts.TL && !opts.TR && !opts.BL && !opts.BR )
107
+ opts = { TL:1, TR:1, BL:1, BR:1 };
108
+
109
+ // support native rounding
110
+ if ($.fn.corner.defaults.useNative && fx == 'round' && (moz || webkit) && !cc && !sc) {
111
+ if (opts.TL)
112
+ $this.css(moz ? '-moz-border-radius-topleft' : '-webkit-border-top-left-radius', width + 'px');
113
+ if (opts.TR)
114
+ $this.css(moz ? '-moz-border-radius-topright' : '-webkit-border-top-right-radius', width + 'px');
115
+ if (opts.BL)
116
+ $this.css(moz ? '-moz-border-radius-bottomleft' : '-webkit-border-bottom-left-radius', width + 'px');
117
+ if (opts.BR)
118
+ $this.css(moz ? '-moz-border-radius-bottomright' : '-webkit-border-bottom-right-radius', width + 'px');
119
+ return;
120
+ }
121
+
122
+ var strip = document.createElement('div');
123
+ strip.style.overflow = 'hidden';
124
+ strip.style.height = '1px';
125
+ strip.style.backgroundColor = sc || 'transparent';
126
+ strip.style.borderStyle = 'solid';
127
+
128
+ var pad = {
129
+ T: parseInt($.css(this,'paddingTop'))||0, R: parseInt($.css(this,'paddingRight'))||0,
130
+ B: parseInt($.css(this,'paddingBottom'))||0, L: parseInt($.css(this,'paddingLeft'))||0
131
+ };
132
+
133
+ if (typeof this.style.zoom != undefined) this.style.zoom = 1; // force 'hasLayout' in IE
134
+ if (!keep) this.style.border = 'none';
135
+ strip.style.borderColor = cc || gpc(this.parentNode);
136
+ var cssHeight = $.curCSS(this, 'height');
137
+
138
+ for (var j in edges) {
139
+ var bot = edges[j];
140
+ // only add stips if needed
141
+ if ((bot && (opts.BL || opts.BR)) || (!bot && (opts.TL || opts.TR))) {
142
+ strip.style.borderStyle = 'none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none');
143
+ var d = document.createElement('div');
144
+ $(d).addClass('jquery-corner');
145
+ var ds = d.style;
146
+
147
+ bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild);
148
+
149
+ if (bot && cssHeight != 'auto') {
150
+ if ($.css(this,'position') == 'static')
151
+ this.style.position = 'relative';
152
+ ds.position = 'absolute';
153
+ ds.bottom = ds.left = ds.padding = ds.margin = '0';
154
+ if (expr)
155
+ ds.setExpression('width', 'this.parentNode.offsetWidth');
156
+ else
157
+ ds.width = '100%';
158
+ }
159
+ else if (!bot && $.browser.msie) {
160
+ if ($.css(this,'position') == 'static')
161
+ this.style.position = 'relative';
162
+ ds.position = 'absolute';
163
+ ds.top = ds.left = ds.right = ds.padding = ds.margin = '0';
164
+
165
+ // fix ie6 problem when blocked element has a border width
166
+ if (expr) {
167
+ var bw = sz(this,'borderLeftWidth') + sz(this,'borderRightWidth');
168
+ ds.setExpression('width', 'this.parentNode.offsetWidth - '+bw+'+ "px"');
169
+ }
170
+ else
171
+ ds.width = '100%';
172
+ }
173
+ else {
174
+ ds.position = 'relative';
175
+ ds.margin = !bot ? '-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px' :
176
+ (pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px';
177
+ }
178
+
179
+ for (var i=0; i < width; i++) {
180
+ var w = Math.max(0,getWidth(fx,i, width));
181
+ var e = strip.cloneNode(false);
182
+ e.style.borderWidth = '0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px';
183
+ bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild);
184
+ }
185
+ }
186
+ }
187
+ });
188
+ };
189
+
190
+ $.fn.uncorner = function() {
191
+ if (moz || webkit)
192
+ this.css(moz ? '-moz-border-radius' : '-webkit-border-radius', 0);
193
+ $('div.jquery-corner', this).remove();
194
+ return this;
195
+ };
196
+
197
+ // expose options
198
+ $.fn.corner.defaults = {
199
+ useNative: true, // true if plugin should attempt to use native browser support for border radius rounding
200
+ metaAttr: 'data-corner' // name of meta attribute to use for options
201
+ };
202
+
203
+ })(jQuery);