cable 0.8.6 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/VERSION +1 -1
  2. data/app/views/layouts/_breadcrumb.html.erb +1 -0
  3. data/app/views/layouts/_messages.html.erb +3 -3
  4. data/app/views/layouts/admin.html.erb +21 -26
  5. data/lib/generators/cable/menu/templates/erb/menus/_menu_children_table.html.erb +1 -1
  6. data/lib/generators/cable/menu/templates/erb/menus/move.html.erb +0 -16
  7. data/lib/generators/cable/menu/templates/migration.rb +1 -0
  8. data/lib/generators/cable/resource/templates/erb/scaffold/_form.html.erb +18 -25
  9. data/lib/generators/cable/resource/templates/erb/scaffold/index.html.erb +47 -45
  10. data/lib/generators/cable/resource/templates/erb/scaffold/show.html.erb +1 -2
  11. data/public/images/cable/add.png +0 -0
  12. data/public/images/cable/children.png +0 -0
  13. data/public/images/cable/empty-menu.png +0 -0
  14. data/public/images/cable/header-background.jpg +0 -0
  15. data/public/images/cable/help.png +0 -0
  16. data/public/images/cable/loader.gif +0 -0
  17. data/public/javascripts/cable_menu.js +316 -0
  18. data/public/stylesheets/cable/base.css +25 -0
  19. data/public/stylesheets/cable/buttons.css +55 -0
  20. data/public/stylesheets/cable/formtastic_changes.css +51 -0
  21. data/public/stylesheets/cable/menu.css +120 -0
  22. data/public/stylesheets/cable/pagination.css +10 -0
  23. data/public/stylesheets/cable/regions.css +247 -0
  24. data/public/stylesheets/cable/search.css +45 -0
  25. data/public/stylesheets/cable/tables.css +34 -0
  26. data/public/stylesheets/cable/tags.css +61 -0
  27. data/public/stylesheets/cable.css +9 -859
  28. data/public/stylesheets/{ui/aristo/images/button_bg.png → jquery/ui/images/bg_fallback.png} +0 -0
  29. data/public/stylesheets/jquery/ui/images/icon_sprite.png +0 -0
  30. data/public/stylesheets/jquery/ui/images/progress_bar.gif +0 -0
  31. data/public/stylesheets/{ui/aristo/images/ui-icons_ffffff_256x240.png → jquery/ui/images/ui-icons_454545_256x240.png} +0 -0
  32. data/public/stylesheets/{ui/aristo/aristo.css → jquery/ui/jquery-ui-1.8.7.custom.css} +345 -166
  33. metadata +27 -66
  34. data/public/images/iphone-style-checkboxes/off.png +0 -0
  35. data/public/images/iphone-style-checkboxes/on.png +0 -0
  36. data/public/images/iphone-style-checkboxes/slider.png +0 -0
  37. data/public/images/iphone-style-checkboxes/slider_center.png +0 -0
  38. data/public/images/iphone-style-checkboxes/slider_left.png +0 -0
  39. data/public/images/iphone-style-checkboxes/slider_right.png +0 -0
  40. data/public/javascripts/iphone-style-checkboxes.js +0 -224
  41. data/public/javascripts/jquery.columnview.js +0 -84
  42. data/public/javascripts/jstree/_lib/jquery.cookie.js +0 -96
  43. data/public/javascripts/jstree/_lib/jquery.hotkeys.js +0 -99
  44. data/public/javascripts/jstree/_lib/jquery.js +0 -6240
  45. data/public/javascripts/jstree/jquery.jstree.js +0 -4526
  46. data/public/javascripts/jstree/themes/apple/bg.jpg +0 -0
  47. data/public/javascripts/jstree/themes/apple/d.png +0 -0
  48. data/public/javascripts/jstree/themes/apple/dot_for_ie.gif +0 -0
  49. data/public/javascripts/jstree/themes/apple/style.css +0 -61
  50. data/public/javascripts/jstree/themes/apple/throbber.gif +0 -0
  51. data/public/javascripts/jstree/themes/classic/d.png +0 -0
  52. data/public/javascripts/jstree/themes/classic/dot_for_ie.gif +0 -0
  53. data/public/javascripts/jstree/themes/classic/style.css +0 -59
  54. data/public/javascripts/jstree/themes/classic/throbber.gif +0 -0
  55. data/public/javascripts/jstree/themes/default/d.gif +0 -0
  56. data/public/javascripts/jstree/themes/default/d.png +0 -0
  57. data/public/javascripts/jstree/themes/default/style.css +0 -73
  58. data/public/javascripts/jstree/themes/default/throbber.gif +0 -0
  59. data/public/javascripts/jstree/themes/default-rtl/d.gif +0 -0
  60. data/public/javascripts/jstree/themes/default-rtl/d.png +0 -0
  61. data/public/javascripts/jstree/themes/default-rtl/dots.gif +0 -0
  62. data/public/javascripts/jstree/themes/default-rtl/style.css +0 -83
  63. data/public/javascripts/jstree/themes/default-rtl/throbber.gif +0 -0
  64. data/public/stylesheets/columnview.css +0 -61
  65. data/public/stylesheets/formtastic_changes.css +0 -66
  66. data/public/stylesheets/iphone_checkboxes.css +0 -76
  67. data/public/stylesheets/ui/aristo/icons.psd +0 -0
  68. data/public/stylesheets/ui/aristo/images/datepicker.gif +0 -0
  69. data/public/stylesheets/ui/aristo/images/icon_sprite.png +0 -0
  70. data/public/stylesheets/ui/aristo/images/progress_bar.gif +0 -0
  71. data/public/stylesheets/ui/aristo/images/right-arrow.png +0 -0
  72. data/public/stylesheets/ui/aristo/images/slider_h_bg.gif +0 -0
  73. data/public/stylesheets/ui/aristo/images/slider_v_bg.gif +0 -0
  74. data/public/stylesheets/ui/aristo/images/tab_bg.gif +0 -0
  75. data/public/stylesheets/ui/aristo/images/the_gradient.gif +0 -0
  76. data/public/stylesheets/ui/aristo/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  77. data/public/stylesheets/ui/aristo/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  78. data/public/stylesheets/ui/aristo/images/ui-bg_flat_10_000000_40x100.png +0 -0
  79. data/public/stylesheets/ui/aristo/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  80. data/public/stylesheets/ui/aristo/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  81. data/public/stylesheets/ui/aristo/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  82. data/public/stylesheets/ui/aristo/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  83. data/public/stylesheets/ui/aristo/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  84. data/public/stylesheets/ui/aristo/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  85. data/public/stylesheets/ui/aristo/images/ui-icons_228ef1_256x240.png +0 -0
  86. data/public/stylesheets/ui/aristo/images/ui-icons_ef8c08_256x240.png +0 -0
  87. data/public/stylesheets/ui/aristo/images/ui-icons_ffd27a_256x240.png +0 -0
  88. data/public/stylesheets/ui/images/sprite-aristo.png +0 -0
  89. data/public/stylesheets/ui/images/uniform/sprite.png +0 -0
  90. data/public/stylesheets/ui/uniform/uniform.aristo.css +0 -470
  91. data/public/stylesheets/ui/uniform/uniform.default.css +0 -477
  92. /data/public/stylesheets/{formtastic.css → cable/formtastic.css} +0 -0
  93. /data/public/stylesheets/{ui/aristo → jquery/ui}/images/slider_handles.png +0 -0
  94. /data/public/stylesheets/{ui/aristo → jquery/ui}/images/ui-icons_222222_256x240.png +0 -0
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: cable
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.8.6
5
+ version: 0.9.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Spencer Markowski
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2011-03-02 00:00:00 -05:00
15
+ date: 2011-03-07 00:00:00 -05:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
@@ -77,6 +77,7 @@ files:
77
77
  - app/views/attachable_assets/index.html.erb
78
78
  - app/views/attachable_assets/new.html.erb
79
79
  - app/views/attachable_assets/show.html.erb
80
+ - app/views/layouts/_breadcrumb.html.erb
80
81
  - app/views/layouts/_messages.html.erb
81
82
  - app/views/layouts/admin.html.erb
82
83
  - config/admin_navigation.rb
@@ -144,47 +145,24 @@ files:
144
145
  - lib/generators/templates/partials/_block.html.erb
145
146
  - lib/generators/templates/partials/_block_form.html.erb
146
147
  - lib/railties/tasks.rake
148
+ - public/images/cable/add.png
147
149
  - public/images/cable/background.png
150
+ - public/images/cable/children.png
148
151
  - public/images/cable/delete.png
152
+ - public/images/cable/empty-menu.png
149
153
  - public/images/cable/event-icon.png
154
+ - public/images/cable/header-background.jpg
155
+ - public/images/cable/help.png
156
+ - public/images/cable/loader.gif
150
157
  - public/images/cable/new-window.png
151
158
  - public/images/cable/nil-icon.png
152
159
  - public/images/cable/page-icon.png
153
160
  - public/images/cable/product-icon.jpg
154
161
  - public/images/cable/story-icon.jpg
155
- - public/images/iphone-style-checkboxes/off.png
156
- - public/images/iphone-style-checkboxes/on.png
157
- - public/images/iphone-style-checkboxes/slider.png
158
- - public/images/iphone-style-checkboxes/slider_center.png
159
- - public/images/iphone-style-checkboxes/slider_left.png
160
- - public/images/iphone-style-checkboxes/slider_right.png
161
162
  - public/javascripts/admin.js
162
- - public/javascripts/iphone-style-checkboxes.js
163
- - public/javascripts/jquery.columnview.js
163
+ - public/javascripts/cable_menu.js
164
164
  - public/javascripts/jquery.tablesorter.min.js
165
165
  - public/javascripts/jquery.tagsinput.js
166
- - public/javascripts/jstree/_lib/jquery.cookie.js
167
- - public/javascripts/jstree/_lib/jquery.hotkeys.js
168
- - public/javascripts/jstree/_lib/jquery.js
169
- - public/javascripts/jstree/jquery.jstree.js
170
- - public/javascripts/jstree/themes/apple/bg.jpg
171
- - public/javascripts/jstree/themes/apple/d.png
172
- - public/javascripts/jstree/themes/apple/dot_for_ie.gif
173
- - public/javascripts/jstree/themes/apple/style.css
174
- - public/javascripts/jstree/themes/apple/throbber.gif
175
- - public/javascripts/jstree/themes/classic/d.png
176
- - public/javascripts/jstree/themes/classic/dot_for_ie.gif
177
- - public/javascripts/jstree/themes/classic/style.css
178
- - public/javascripts/jstree/themes/classic/throbber.gif
179
- - public/javascripts/jstree/themes/default-rtl/d.gif
180
- - public/javascripts/jstree/themes/default-rtl/d.png
181
- - public/javascripts/jstree/themes/default-rtl/dots.gif
182
- - public/javascripts/jstree/themes/default-rtl/style.css
183
- - public/javascripts/jstree/themes/default-rtl/throbber.gif
184
- - public/javascripts/jstree/themes/default/d.gif
185
- - public/javascripts/jstree/themes/default/d.png
186
- - public/javascripts/jstree/themes/default/style.css
187
- - public/javascripts/jstree/themes/default/throbber.gif
188
166
  - public/javascripts/tinymce/jquery.tinymce.js
189
167
  - public/javascripts/tinymce/langs/en.js
190
168
  - public/javascripts/tinymce/license.txt
@@ -436,6 +414,7 @@ files:
436
414
  - public/javascripts/tinymce/utils/mctabs.js
437
415
  - public/javascripts/tinymce/utils/validate.js
438
416
  - public/stylesheets/cable.css
417
+ - public/stylesheets/cable/base.css
439
418
  - public/stylesheets/cable/blueprint/ie.css
440
419
  - public/stylesheets/cable/blueprint/plugins/buttons/icons/cross.png
441
420
  - public/stylesheets/cable/blueprint/plugins/buttons/icons/key.png
@@ -465,40 +444,22 @@ files:
465
444
  - public/stylesheets/cable/blueprint/src/print.css
466
445
  - public/stylesheets/cable/blueprint/src/reset.css
467
446
  - public/stylesheets/cable/blueprint/src/typography.css
468
- - public/stylesheets/columnview.css
469
- - public/stylesheets/formtastic.css
470
- - public/stylesheets/formtastic_changes.css
471
- - public/stylesheets/iphone_checkboxes.css
472
- - public/stylesheets/ui/aristo/aristo.css
473
- - public/stylesheets/ui/aristo/icons.psd
474
- - public/stylesheets/ui/aristo/images/button_bg.png
475
- - public/stylesheets/ui/aristo/images/datepicker.gif
476
- - public/stylesheets/ui/aristo/images/icon_sprite.png
477
- - public/stylesheets/ui/aristo/images/progress_bar.gif
478
- - public/stylesheets/ui/aristo/images/right-arrow.png
479
- - public/stylesheets/ui/aristo/images/slider_h_bg.gif
480
- - public/stylesheets/ui/aristo/images/slider_handles.png
481
- - public/stylesheets/ui/aristo/images/slider_v_bg.gif
482
- - public/stylesheets/ui/aristo/images/tab_bg.gif
483
- - public/stylesheets/ui/aristo/images/the_gradient.gif
484
- - public/stylesheets/ui/aristo/images/ui-bg_diagonals-thick_18_b81900_40x40.png
485
- - public/stylesheets/ui/aristo/images/ui-bg_diagonals-thick_20_666666_40x40.png
486
- - public/stylesheets/ui/aristo/images/ui-bg_flat_10_000000_40x100.png
487
- - public/stylesheets/ui/aristo/images/ui-bg_glass_100_f6f6f6_1x400.png
488
- - public/stylesheets/ui/aristo/images/ui-bg_glass_100_fdf5ce_1x400.png
489
- - public/stylesheets/ui/aristo/images/ui-bg_glass_65_ffffff_1x400.png
490
- - public/stylesheets/ui/aristo/images/ui-bg_gloss-wave_35_f6a828_500x100.png
491
- - public/stylesheets/ui/aristo/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
492
- - public/stylesheets/ui/aristo/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
493
- - public/stylesheets/ui/aristo/images/ui-icons_222222_256x240.png
494
- - public/stylesheets/ui/aristo/images/ui-icons_228ef1_256x240.png
495
- - public/stylesheets/ui/aristo/images/ui-icons_ef8c08_256x240.png
496
- - public/stylesheets/ui/aristo/images/ui-icons_ffd27a_256x240.png
497
- - public/stylesheets/ui/aristo/images/ui-icons_ffffff_256x240.png
498
- - public/stylesheets/ui/images/sprite-aristo.png
499
- - public/stylesheets/ui/images/uniform/sprite.png
500
- - public/stylesheets/ui/uniform/uniform.aristo.css
501
- - public/stylesheets/ui/uniform/uniform.default.css
447
+ - public/stylesheets/cable/buttons.css
448
+ - public/stylesheets/cable/formtastic.css
449
+ - public/stylesheets/cable/formtastic_changes.css
450
+ - public/stylesheets/cable/menu.css
451
+ - public/stylesheets/cable/pagination.css
452
+ - public/stylesheets/cable/regions.css
453
+ - public/stylesheets/cable/search.css
454
+ - public/stylesheets/cable/tables.css
455
+ - public/stylesheets/cable/tags.css
456
+ - public/stylesheets/jquery/ui/images/bg_fallback.png
457
+ - public/stylesheets/jquery/ui/images/icon_sprite.png
458
+ - public/stylesheets/jquery/ui/images/progress_bar.gif
459
+ - public/stylesheets/jquery/ui/images/slider_handles.png
460
+ - public/stylesheets/jquery/ui/images/ui-icons_222222_256x240.png
461
+ - public/stylesheets/jquery/ui/images/ui-icons_454545_256x240.png
462
+ - public/stylesheets/jquery/ui/jquery-ui-1.8.7.custom.css
502
463
  has_rdoc: true
503
464
  homepage:
504
465
  licenses: []
@@ -1,224 +0,0 @@
1
- /*!
2
- // iPhone-style Checkboxes jQuery plugin
3
- // Copyright Thomas Reynolds, licensed GPL & MIT
4
- */
5
- ;(function($, iphoneStyle) {
6
-
7
- // Constructor
8
- $[iphoneStyle] = function(elem, options) {
9
- this.$elem = $(elem);
10
-
11
- // Import options into instance variables
12
- var obj = this;
13
- $.each(options, function(key, value) {
14
- obj[key] = value;
15
- });
16
-
17
- // Initialize the control
18
- this.wrapCheckboxWithDivs();
19
- this.attachEvents();
20
- this.disableTextSelection();
21
-
22
- if (this.resizeHandle) { this.optionallyResize('handle'); }
23
- if (this.resizeContainer) { this.optionallyResize('container'); }
24
-
25
- this.initialPosition();
26
- };
27
-
28
- $.extend($[iphoneStyle].prototype, {
29
- // Wrap the existing input[type=checkbox] with divs for styling and grab DOM references to the created nodes
30
- wrapCheckboxWithDivs: function() {
31
- this.$elem.wrap('<div class="' + this.containerClass + '" />');
32
- this.container = this.$elem.parent();
33
-
34
- this.offLabel = $('<label class="'+ this.labelOffClass +'">' +
35
- '<span>'+ this.uncheckedLabel +'</span>' +
36
- '</label>').appendTo(this.container);
37
- this.offSpan = this.offLabel.children('span');
38
-
39
- this.onLabel = $('<label class="'+ this.labelOnClass +'">' +
40
- '<span>'+ this.checkedLabel +'</span>' +
41
- '</label>').appendTo(this.container);
42
- this.onSpan = this.onLabel.children('span');
43
-
44
- this.handle = $('<div class="' + this.handleClass + '">' +
45
- '<div class="' + this.handleRightClass + '">' +
46
- '<div class="' + this.handleCenterClass + '" />' +
47
- '</div>' +
48
- '</div>').appendTo(this.container);
49
- },
50
-
51
- // Disable IE text selection, other browsers are handled in CSS
52
- disableTextSelection: function() {
53
- if (!$.browser.msie) { return; }
54
-
55
- // Elements containing text should be unselectable
56
- $.each([this.handle, this.offLabel, this.onLabel, this.container], function(el) {
57
- $(el).attr("unselectable", "on");
58
- });
59
- },
60
-
61
- // Automatically resize the handle or container
62
- optionallyResize: function(mode) {
63
- var onLabelWidth = this.onLabel.width(),
64
- offLabelWidth = this.offLabel.width();
65
-
66
- if (mode == 'container') {
67
- var newWidth = (onLabelWidth > offLabelWidth) ? onLabelWidth : offLabelWidth;
68
- newWidth += this.handle.width() + 15;
69
- } else {
70
- var newWidth = (onLabelWidth < offLabelWidth) ? onLabelWidth : offLabelWidth;
71
- }
72
-
73
- this[mode].css({ width: newWidth });
74
- },
75
-
76
- attachEvents: function() {
77
- var obj = this;
78
-
79
- // A mousedown anywhere in the control will start tracking for dragging
80
- this.container
81
- .bind('mousedown touchstart', function(event) {
82
- event.preventDefault();
83
-
84
- if (obj.$elem.is(':disabled')) { return; }
85
-
86
- var x = event.pageX || event.originalEvent.changedTouches[0].pageX;
87
- $[iphoneStyle].currentlyClicking = obj.handle;
88
- $[iphoneStyle].dragStartPosition = x;
89
- $[iphoneStyle].handleLeftOffset = parseInt(obj.handle.css('left'), 10) || 0;
90
- })
91
-
92
- // Utilize event bubbling to handle drag on any element beneath the container
93
- .bind('iPhoneDrag', function(event, x) {
94
- event.preventDefault();
95
-
96
- if (obj.$elem.is(':disabled')) { return; }
97
-
98
- var p = (x + $[iphoneStyle].handleLeftOffset - $[iphoneStyle].dragStartPosition) / obj.rightSide;
99
- if (p < 0) { p = 0; }
100
- if (p > 1) { p = 1; }
101
- obj.handle.css({ left: p * obj.rightSide });
102
- obj.onLabel.css({ width: p * obj.rightSide + 4 });
103
- obj.offSpan.css({ marginRight: -p * obj.rightSide });
104
- obj.onSpan.css({ marginLeft: -(1 - p) * obj.rightSide });
105
- })
106
-
107
- // Utilize event bubbling to handle drag end on any element beneath the container
108
- .bind('iPhoneDragEnd', function(event, x) {
109
- if (obj.$elem.is(':disabled')) { return; }
110
-
111
- if ($[iphoneStyle].dragging) {
112
- var p = (x - $[iphoneStyle].dragStartPosition) / obj.rightSide;
113
- obj.$elem.attr('checked', (p >= 0.5));
114
- } else {
115
- obj.$elem.attr('checked', !obj.$elem.attr('checked'));
116
- }
117
-
118
- $[iphoneStyle].currentlyClicking = null;
119
- $[iphoneStyle].dragging = null;
120
- obj.$elem.change();
121
- });
122
-
123
- // Animate when we get a change event
124
- this.$elem.change(function() {
125
- if (obj.$elem.is(':disabled')) {
126
- obj.container.addClass(obj.disabledClass);
127
- return false;
128
- } else {
129
- obj.container.removeClass(obj.disabledClass);
130
- }
131
-
132
- var new_left = obj.$elem.attr('checked') ? obj.rightSide : 0;
133
-
134
- obj.handle.animate({ left: new_left }, obj.duration);
135
- obj.onLabel.animate({ width: new_left + 4 }, obj.duration);
136
- obj.offSpan.animate({ marginRight: -new_left }, obj.duration);
137
- obj.onSpan.animate({ marginLeft: new_left - obj.rightSide }, obj.duration);
138
- });
139
- },
140
-
141
- // Setup the control's inital position
142
- initialPosition: function() {
143
- this.offLabel.css({ width: this.container.width() - 5 });
144
-
145
- var offset = ($.browser.msie && $.browser.version < 7) ? 3 : 6;
146
- this.rightSide = this.container.width() - this.handle.width() - offset;
147
-
148
- if (this.$elem.is(':checked')) {
149
- this.handle.css({ left: this.rightSide });
150
- this.onLabel.css({ width: this.rightSide + 4 });
151
- this.offSpan.css({ marginRight: -this.rightSide });
152
- } else {
153
- this.onLabel.css({ width: 0 });
154
- this.onSpan.css({ marginLeft: -this.rightSide });
155
- }
156
-
157
- if (this.$elem.is(':disabled')) {
158
- this.container.addClass(this.disabledClass);
159
- }
160
- }
161
- });
162
-
163
- // jQuery-specific code
164
- $.fn[iphoneStyle] = function(options) {
165
- var checkboxes = this.filter(':checkbox');
166
-
167
- // Fail early if we don't have any checkboxes passed in
168
- if (!checkboxes.length) { return this; }
169
-
170
- // Merge options passed in with global defaults
171
- var opt = $.extend({}, $[iphoneStyle].defaults, options);
172
-
173
- checkboxes.each(function() {
174
- $(this).data(iphoneStyle, new $[iphoneStyle](this, opt));
175
- });
176
-
177
- if (!$[iphoneStyle].initComplete) {
178
- // As the mouse moves on the page, animate if we are in a drag state
179
- $(document)
180
- .bind('mousemove touchmove', function(event) {
181
- if (!$[iphoneStyle].currentlyClicking) { return; }
182
- event.preventDefault();
183
-
184
- var x = event.pageX || event.originalEvent.changedTouches[0].pageX;
185
- if (!$[iphoneStyle].dragging &&
186
- (Math.abs($[iphoneStyle].dragStartPosition - x) > opt.dragThreshold)) {
187
- $[iphoneStyle].dragging = true;
188
- }
189
-
190
- $(event.target).trigger('iPhoneDrag', [x]);
191
- })
192
-
193
- // When the mouse comes up, leave drag state
194
- .bind('mouseup touchend', function(event) {
195
- if (!$[iphoneStyle].currentlyClicking) { return; }
196
- event.preventDefault();
197
-
198
- var x = event.pageX || event.originalEvent.changedTouches[0].pageX;
199
- $($[iphoneStyle].currentlyClicking).trigger('iPhoneDragEnd', [x]);
200
- });
201
-
202
- $[iphoneStyle].initComplete = true;
203
- }
204
-
205
- return this;
206
- }; // End of $.fn[iphoneStyle]
207
-
208
- $[iphoneStyle].defaults = {
209
- duration: 200, // Time spent during slide animation
210
- checkedLabel: 'ON', // Text content of "on" state
211
- uncheckedLabel: 'OFF', // Text content of "off" state
212
- resizeHandle: true, // Automatically resize the handle to cover either label
213
- resizeContainer: true, // Automatically resize the widget to contain the labels
214
- disabledClass: 'iPhoneCheckDisabled',
215
- containerClass: 'iPhoneCheckContainer',
216
- labelOnClass: 'iPhoneCheckLabelOn',
217
- labelOffClass: 'iPhoneCheckLabelOff',
218
- handleClass: 'iPhoneCheckHandle',
219
- handleCenterClass: 'iPhoneCheckHandleCenter',
220
- handleRightClass: 'iPhoneCheckHandleRight',
221
- dragThreshold: 5 // Pixels that must be dragged for a click to be ignored
222
- };
223
-
224
- })(jQuery, 'iphoneStyle');
@@ -1,84 +0,0 @@
1
- /**
2
- * jquery.columnview-1.2.js
3
- *
4
- * Created by Chris Yates on 2009-02-26.
5
- * http://christianyates.com
6
- * Copyright 2009 Christian Yates and ASU Mars Space Flight Facility. All rights reserved.
7
- *
8
- * Supported under jQuery 1.2.x or later
9
- * Keyboard navigation supported under 1.3.x or later
10
- *
11
- * Dual licensed under MIT and GPL.
12
- */
13
-
14
- (function($){
15
- function probe_tree(tree){
16
-
17
- $(tree).children().each(function(index){
18
-
19
- if($(this).is("ul")){
20
- o1 = $('.columnview').offset();
21
- o2 = $(this).parent().offset();
22
- dy = o1.top - o2.top;
23
- $(this).css({"top":dy});
24
- $(this).addClass("level");
25
- $(this).sortable({
26
- connectWith : ".level"
27
- })
28
- }
29
-
30
- if($(this).is("li")){
31
- $(this).addClass("level_wrapper");
32
- }
33
- });
34
- }
35
- function make_active(item){
36
- $(item).parentsUntil(".columview").addClass("active");
37
- }
38
-
39
- $.fn.columnview = function(options){
40
- var settings = $.extend({}, $.fn.columnview.defaults, options);
41
-
42
- probe_tree(this, 0);
43
-
44
- var key_event = $.browser.mozilla ? 'keypress' : 'keydown';
45
-
46
- $(this).bind("click " + key_event, function(event){
47
-
48
- if ($(event.target).is("a,span")) {
49
- if ($(event.target).is("span")){
50
- var self = $(event.target).parent();
51
- }else {
52
- var self = event.target;
53
- }
54
-
55
-
56
- self.focus();
57
-
58
- var container = $(self).parents('.containerobj');
59
-
60
- // Handle clicks
61
- if (event.type == "click"){
62
- probe_tree($(self).parent());
63
- $(".active").removeClass("active");
64
- $(".targeted").removeClass("targeted");
65
- $(self).addClass("targeted");
66
- make_active(self);
67
-
68
- }
69
- }
70
- });
71
- };
72
-
73
-
74
-
75
- $.fn.columnview.defaults = {
76
- multi: false, // Allow multiple selections
77
- preview: false, // Handler for preview pane
78
- fixedwidth: false,// Use fixed width columns
79
- onchange: false // Handler for selection change
80
- };
81
-
82
-
83
-
84
- })(jQuery);
@@ -1,96 +0,0 @@
1
- /**
2
- * Cookie plugin
3
- *
4
- * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
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
- /**
12
- * Create a cookie with the given name and value and other optional parameters.
13
- *
14
- * @example $.cookie('the_cookie', 'the_value');
15
- * @desc Set the value of a cookie.
16
- * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
17
- * @desc Create a cookie with all available options.
18
- * @example $.cookie('the_cookie', 'the_value');
19
- * @desc Create a session cookie.
20
- * @example $.cookie('the_cookie', null);
21
- * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
22
- * used when the cookie was set.
23
- *
24
- * @param String name The name of the cookie.
25
- * @param String value The value of the cookie.
26
- * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
27
- * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
28
- * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
29
- * If set to null or omitted, the cookie will be a session cookie and will not be retained
30
- * when the the browser exits.
31
- * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
32
- * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
33
- * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
34
- * require a secure protocol (like HTTPS).
35
- * @type undefined
36
- *
37
- * @name $.cookie
38
- * @cat Plugins/Cookie
39
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
40
- */
41
-
42
- /**
43
- * Get the value of a cookie with the given name.
44
- *
45
- * @example $.cookie('the_cookie');
46
- * @desc Get the value of a cookie.
47
- *
48
- * @param String name The name of the cookie.
49
- * @return The value of the cookie.
50
- * @type String
51
- *
52
- * @name $.cookie
53
- * @cat Plugins/Cookie
54
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
55
- */
56
- jQuery.cookie = function(name, value, options) {
57
- if (typeof value != 'undefined') { // name and value given, set cookie
58
- options = options || {};
59
- if (value === null) {
60
- value = '';
61
- options.expires = -1;
62
- }
63
- var expires = '';
64
- if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
65
- var date;
66
- if (typeof options.expires == 'number') {
67
- date = new Date();
68
- date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
69
- } else {
70
- date = options.expires;
71
- }
72
- expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
73
- }
74
- // CAUTION: Needed to parenthesize options.path and options.domain
75
- // in the following expressions, otherwise they evaluate to undefined
76
- // in the packed version for some reason...
77
- var path = options.path ? '; path=' + (options.path) : '';
78
- var domain = options.domain ? '; domain=' + (options.domain) : '';
79
- var secure = options.secure ? '; secure' : '';
80
- document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
81
- } else { // only name given, get cookie
82
- var cookieValue = null;
83
- if (document.cookie && document.cookie != '') {
84
- var cookies = document.cookie.split(';');
85
- for (var i = 0; i < cookies.length; i++) {
86
- var cookie = jQuery.trim(cookies[i]);
87
- // Does this cookie string begin with the name we want?
88
- if (cookie.substring(0, name.length + 1) == (name + '=')) {
89
- cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
90
- break;
91
- }
92
- }
93
- }
94
- return cookieValue;
95
- }
96
- };
@@ -1,99 +0,0 @@
1
- /*
2
- * jQuery Hotkeys Plugin
3
- * Copyright 2010, John Resig
4
- * Dual licensed under the MIT or GPL Version 2 licenses.
5
- *
6
- * Based upon the plugin by Tzury Bar Yochay:
7
- * http://github.com/tzuryby/hotkeys
8
- *
9
- * Original idea by:
10
- * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
11
- */
12
-
13
- (function(jQuery){
14
-
15
- jQuery.hotkeys = {
16
- version: "0.8",
17
-
18
- specialKeys: {
19
- 8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
20
- 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
21
- 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del",
22
- 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
23
- 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
24
- 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
25
- 120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 191: "/", 224: "meta"
26
- },
27
-
28
- shiftNums: {
29
- "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
30
- "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
31
- ".": ">", "/": "?", "\\": "|"
32
- }
33
- };
34
-
35
- function keyHandler( handleObj ) {
36
- // Only care when a possible input has been specified
37
- if ( typeof handleObj.data !== "string" ) {
38
- return;
39
- }
40
-
41
- var origHandler = handleObj.handler,
42
- keys = handleObj.data.toLowerCase().split(" ");
43
-
44
- handleObj.handler = function( event ) {
45
- // Don't fire in text-accepting inputs that we didn't directly bind to
46
- if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
47
- event.target.type === "text") ) {
48
- return;
49
- }
50
-
51
- // Keypress represents characters, not special keys
52
- var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ],
53
- character = String.fromCharCode( event.which ).toLowerCase(),
54
- key, modif = "", possible = {};
55
-
56
- // check combinations (alt|ctrl|shift+anything)
57
- if ( event.altKey && special !== "alt" ) {
58
- modif += "alt+";
59
- }
60
-
61
- if ( event.ctrlKey && special !== "ctrl" ) {
62
- modif += "ctrl+";
63
- }
64
-
65
- // TODO: Need to make sure this works consistently across platforms
66
- if ( event.metaKey && !event.ctrlKey && special !== "meta" ) {
67
- modif += "meta+";
68
- }
69
-
70
- if ( event.shiftKey && special !== "shift" ) {
71
- modif += "shift+";
72
- }
73
-
74
- if ( special ) {
75
- possible[ modif + special ] = true;
76
-
77
- } else {
78
- possible[ modif + character ] = true;
79
- possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true;
80
-
81
- // "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
82
- if ( modif === "shift+" ) {
83
- possible[ jQuery.hotkeys.shiftNums[ character ] ] = true;
84
- }
85
- }
86
-
87
- for ( var i = 0, l = keys.length; i < l; i++ ) {
88
- if ( possible[ keys[i] ] ) {
89
- return origHandler.apply( this, arguments );
90
- }
91
- }
92
- };
93
- }
94
-
95
- jQuery.each([ "keydown", "keyup", "keypress" ], function() {
96
- jQuery.event.special[ this ] = { add: keyHandler };
97
- });
98
-
99
- })( jQuery );