spiderfw 0.5.7 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. data/Rakefile +17 -6
  2. data/apps/cas_server/controllers/mixins/cas_login_mixin.rb +18 -5
  3. data/apps/cas_server/lib/cas.rb +1 -1
  4. data/apps/cms/models/content.rb +16 -0
  5. data/apps/cms/models/news_item.rb +7 -0
  6. data/apps/cms/models/translation.rb +14 -0
  7. data/apps/cms/views/admin/admin.shtml +16 -0
  8. data/apps/cms/views/admin/content.shtml +4 -0
  9. data/apps/core/acl/_init.rb +10 -0
  10. data/apps/core/acl/controllers/acl_controller.rb +14 -0
  11. data/apps/core/acl/models/permission.rb +11 -0
  12. data/apps/core/acl/views/acl.layout.shtml +8 -0
  13. data/apps/core/acl/views/index.shtml +3 -0
  14. data/apps/core/auth/controllers/mixins/auth_helper.rb +3 -3
  15. data/apps/core/auth/lib/authenticable.rb +4 -0
  16. data/apps/core/auth/models/super_user.rb +1 -0
  17. data/apps/core/auth/po/it/spider_auth.po +18 -10
  18. data/apps/core/auth/po/spider_auth.pot +13 -1
  19. data/apps/core/components/_init.rb +2 -1
  20. data/apps/core/components/po/it/spider_components.po +3 -3
  21. data/apps/core/components/po/spider_components.pot +3 -3
  22. data/apps/core/components/public/css/month_calendar.css +24 -0
  23. data/apps/core/components/public/js/jquery/jquery-1.4.2-min.js +154 -0
  24. data/apps/core/components/public/js/jquery/jquery-1.4.2.js +6240 -0
  25. data/apps/core/components/public/js/jquery/plugins/jquery.form.js +1 -1
  26. data/apps/core/components/public/js/spider.js +26 -20
  27. data/apps/core/components/widgets/admin/admin.rb +1 -1
  28. data/apps/core/components/widgets/crud/crud.rb +1 -1
  29. data/apps/core/components/widgets/list/list.rb +2 -2
  30. data/apps/core/components/widgets/month_calendar/month_calendar.rb +67 -0
  31. data/apps/core/components/widgets/month_calendar/month_calendar.shtml +21 -0
  32. data/apps/core/components/widgets/table/table.rb +4 -2
  33. data/apps/core/components/widgets/table/table.shtml +37 -31
  34. data/apps/core/forms/_init.rb +2 -1
  35. data/apps/core/forms/po/it/spider_forms.po +14 -2
  36. data/apps/core/forms/po/spider_forms.pot +13 -1
  37. data/apps/core/forms/public/css/file_input.css +15 -0
  38. data/apps/core/forms/public/{form.css → css/form.css} +8 -0
  39. data/apps/core/forms/public/file_input.js +37 -0
  40. data/apps/core/forms/tags/element_label.erb +4 -1
  41. data/apps/core/forms/tags/element_row.erb +7 -2
  42. data/apps/core/forms/tags/row.erb +10 -1
  43. data/apps/core/forms/widgets/form/form.rb +43 -10
  44. data/apps/core/forms/widgets/form/form.shtml +12 -5
  45. data/apps/core/forms/widgets/inputs/date_time/date_time.shtml +1 -0
  46. data/apps/core/forms/widgets/inputs/file_input/file_input.rb +43 -0
  47. data/apps/core/forms/widgets/inputs/file_input/file_input.shtml +12 -0
  48. data/apps/core/forms/widgets/inputs/input/input.rb +23 -1
  49. data/apps/core/forms/widgets/inputs/password/password.rb +1 -0
  50. data/apps/core/forms/widgets/inputs/text/text.shtml +1 -1
  51. data/apps/core/forms/widgets/inputs/text_area/text_area.shtml +2 -2
  52. data/apps/git_model_versioning/models/mixins/git_versioned.rb +91 -0
  53. data/apps/hippo/models/mixins/hippo_struct.rb +42 -26
  54. data/apps/master/controllers/git.rb +32 -0
  55. data/apps/messenger/_init.rb +1 -1
  56. data/apps/messenger/config/options.rb +2 -0
  57. data/apps/messenger/config/worker/queue.rb +3 -0
  58. data/apps/messenger/controllers/mixins/{messenger_controller_mixin.rb → messenger_helper.rb} +8 -6
  59. data/apps/messenger/messenger.rb +10 -3
  60. data/apps/messenger/models/message.rb +2 -2
  61. data/apps/messenger/po/it/spider_messenger.po +1 -1
  62. data/apps/messenger/po/spider_messenger.pot +1 -1
  63. data/apps/saml/_init.rb +13 -0
  64. data/apps/saml/controllers/saml2idp.rb +18 -0
  65. data/apps/saml/lib/bindings/http_redirect_binding.rb +14 -0
  66. data/apps/saml/lib/messages/authn_request.rb +52 -0
  67. data/apps/saml/lib/saml.rb +10 -0
  68. data/apps/soap/controllers/soap_controller.rb +12 -2
  69. data/apps/soap/lib/soap.rb +16 -1
  70. data/apps/soap/soap.gemspec +10 -0
  71. data/apps/webdav/lib/locking.rb +2 -2
  72. data/apps/worker/_init.rb +2 -0
  73. data/apps/worker/config/options.rb +1 -0
  74. data/apps/worker/worker.rb +17 -4
  75. data/blueprints/app/__APP__.appspec +4 -0
  76. data/blueprints/app/_init.rb +5 -8
  77. data/blueprints/app/controllers/__APP___controller.rb +2 -1
  78. data/blueprints/app/views/__APP__.layout.shtml +4 -1
  79. data/blueprints/install/config/config.yml +2 -4
  80. data/blueprints/model.rb +15 -0
  81. data/data/locale/it/LC_MESSAGES/spider.mo +0 -0
  82. data/data/locale/it/LC_MESSAGES/spider_auth.mo +0 -0
  83. data/data/locale/it/LC_MESSAGES/spider_components.mo +0 -0
  84. data/data/locale/it/LC_MESSAGES/spider_forms.mo +0 -0
  85. data/data/locale/it/LC_MESSAGES/spider_messenger.mo +0 -0
  86. data/lib/spiderfw/app.rb +93 -31
  87. data/lib/spiderfw/autoload.rb +1 -0
  88. data/lib/spiderfw/cmd/cmd.rb +8 -1
  89. data/lib/spiderfw/cmd/commands/config.rb +54 -0
  90. data/lib/spiderfw/config/configuration.rb +30 -0
  91. data/lib/spiderfw/config/options/spider.rb +18 -6
  92. data/lib/spiderfw/controller/controller.rb +12 -11
  93. data/lib/spiderfw/controller/dispatcher.rb +5 -4
  94. data/lib/spiderfw/controller/http_controller.rb +16 -2
  95. data/lib/spiderfw/controller/mixins/http_mixin.rb +3 -2
  96. data/lib/spiderfw/controller/mixins/static_content.rb +8 -2
  97. data/lib/spiderfw/controller/mixins/visual.rb +72 -52
  98. data/lib/spiderfw/controller/request.rb +7 -3
  99. data/lib/spiderfw/controller/scene.rb +6 -0
  100. data/lib/spiderfw/controller/session.rb +12 -8
  101. data/lib/spiderfw/env.rb +1 -1
  102. data/lib/spiderfw/http/adapters/mongrel.rb +1 -1
  103. data/lib/spiderfw/http/http.rb +48 -19
  104. data/lib/spiderfw/i18n/cldr.rb +53 -3
  105. data/lib/spiderfw/i18n/i18n.rb +52 -2
  106. data/lib/spiderfw/i18n/provider.rb +24 -0
  107. data/lib/spiderfw/i18n/rails.rb +24 -0
  108. data/lib/spiderfw/model/active_record.rb +3 -3
  109. data/lib/spiderfw/model/base_model.rb +45 -14
  110. data/lib/spiderfw/model/condition.rb +11 -2
  111. data/lib/spiderfw/model/data_type.rb +15 -7
  112. data/lib/spiderfw/model/datatypes/decimal.rb +15 -3
  113. data/lib/spiderfw/model/datatypes/file_path.rb +50 -0
  114. data/lib/spiderfw/model/datatypes/serialized_object.rb +0 -4
  115. data/lib/spiderfw/model/datatypes/uuid.rb +3 -3
  116. data/lib/spiderfw/model/datatypes.rb +1 -0
  117. data/lib/spiderfw/model/extended_models/managed.rb +11 -2
  118. data/lib/spiderfw/model/mappers/db_mapper.rb +116 -52
  119. data/lib/spiderfw/model/mappers/mapper.rb +36 -14
  120. data/lib/spiderfw/model/mixins/state_machine.rb +45 -9
  121. data/lib/spiderfw/model/mixins/versioned.rb +1 -1
  122. data/lib/spiderfw/model/model.rb +2 -1
  123. data/lib/spiderfw/model/query_set.rb +21 -3
  124. data/lib/spiderfw/model/request.rb +7 -0
  125. data/lib/spiderfw/model/storage/db/adapters/mssql.rb +2 -1
  126. data/lib/spiderfw/model/storage/db/adapters/mysql.rb +4 -1
  127. data/lib/spiderfw/model/storage/db/adapters/oci8.rb +35 -18
  128. data/lib/spiderfw/model/storage/db/adapters/sqlite.rb +68 -34
  129. data/lib/spiderfw/model/storage/db/connectors/odbc.rb +1 -1
  130. data/lib/spiderfw/model/storage/db/db_schema.rb +33 -4
  131. data/lib/spiderfw/model/storage/db/db_storage.rb +27 -8
  132. data/lib/spiderfw/requires.rb +2 -0
  133. data/lib/spiderfw/tag/tag.rb +1 -1
  134. data/lib/spiderfw/templates/blocks/attr_if.rb +7 -1
  135. data/lib/spiderfw/templates/blocks/each.rb +8 -3
  136. data/lib/spiderfw/templates/blocks/html.rb +12 -22
  137. data/lib/spiderfw/templates/blocks/render.rb +3 -3
  138. data/lib/spiderfw/templates/blocks/run.rb +47 -11
  139. data/lib/spiderfw/templates/blocks/tag_if.rb +2 -2
  140. data/lib/spiderfw/templates/blocks/text.rb +2 -1
  141. data/lib/spiderfw/templates/blocks/widget.rb +5 -3
  142. data/lib/spiderfw/templates/blocks/yield.rb +1 -1
  143. data/lib/spiderfw/templates/template.rb +27 -24
  144. data/lib/spiderfw/templates/template_blocks.rb +37 -14
  145. data/lib/spiderfw/utils/monkey/exception.rb +1 -1
  146. data/lib/spiderfw/utils/monkey/nil_class.rb +7 -0
  147. data/lib/spiderfw/utils/monkey/numeric.rb +15 -0
  148. data/lib/spiderfw/version.rb +1 -1
  149. data/lib/spiderfw/widget/widget.rb +36 -33
  150. data/lib/spiderfw/widget/widget_attributes.rb +1 -1
  151. data/lib/spiderfw.rb +18 -5
  152. data/spider.gemspec +5 -5
  153. metadata +44 -18
  154. data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.js +0 -187
  155. data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.min.js +0 -1
  156. data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.spider.1.0.js +0 -193
  157. data/apps/core/forms/widgets/inputs/subform/subform.rb +0 -10
  158. data/apps/core/forms/widgets/inputs/subform/subform.shtml +0 -5
  159. data/apps/messenger/config/worker.rb +0 -3
  160. data/lib/spiderfw/controller/app_controller.rb +0 -14
  161. data/lib/spiderfw/utils/test_case.rb +0 -24
@@ -1,187 +0,0 @@
1
- // JavaScript Document
2
- (function($) {
3
-
4
- $.fn.jTree = function(options) {
5
- var opts = $.extend({}, $.fn.jTree.defaults, options);
6
- var cur = 0, curOff = 0, off =0, h =0, w=0, hover = 0;
7
- var str='<li class="jTreePlacement" style="background:'+opts.pBg+';border:'+opts.pBorder+';color:'+opts.pColor+';height:'+opts.pHeight+'"></li>';
8
- var container = this;
9
- //events are written here
10
- $(this).find("li").mousedown(function(e){
11
- if ($("#jTreeHelper").is(":not(:animated)") && e.button !=2) {
12
- // append jTreePlacement to body and hides
13
- $("body").append(str);
14
- $(".jTreePlacement").hide();
15
- //get the current li and append to helper
16
- $(this).clone().appendTo("#jTreeHelper");
17
-
18
- // get initial state, cur and offset
19
- cur = this;
20
- curOff = $(cur).offset();
21
- $(cur).hide();
22
- // show initial helper
23
- $("#jTreeHelper").css ({
24
- position: "absolute",
25
- top: e.pageY + 5,
26
- left: e.pageX + 5,
27
- background: opts.hBg,
28
- opacity: opts.hOpacity
29
- }).show();
30
- $("#jTreeHelper *").css ({
31
- color: opts.hColor,
32
- background: opts.hBg,
33
- });
34
- // start binding events to use
35
- // prevent text selection
36
- $(document).bind("selectstart", doNothing);
37
-
38
- // doubleclick is destructive, better disable
39
- $(container).find("li").bind("dblclick", doNothing);
40
-
41
- // in single li calculate the offset, width height of hovered block
42
- $(container).find("li").bind("mouseover", getInitial);
43
-
44
- // in single li put placement in correct places, also move the helper around
45
- $(container).find("li").bind("mousemove", putPlacement);
46
-
47
- // handle mouse movement outside our container
48
- $(document).bind("mousemove", helperPosition);
49
- }
50
- //prevent bubbling of mousedown
51
- return false;
52
- });
53
-
54
- // in single li or in container, snap into placement if present then destroy placement
55
- // and helper then show snapped in object/li
56
- // also destroys events
57
- $(this).find("li").andSelf().mouseup(function(e){
58
- // if placementBox is detected
59
- if ($(".jTreePlacement").is(":visible")) {
60
- $(cur).insertBefore(".jTreePlacement").show();
61
- }
62
- $(cur).show();
63
- // remove helper and placement box
64
- $(container).find("ul:empty").remove();
65
- $("#jTreeHelper").empty().hide();
66
- $(".jTreePlacement").remove();
67
-
68
- // remove bindings
69
- destroyBindings();
70
-
71
- return false;
72
- });
73
-
74
- $(document).mouseup(function(e){
75
- if (cur!=0) {
76
- $("#jTreeHelper").animate({
77
- top: curOff.top,
78
- left: curOff.left
79
- }, opts.snapBack, function(){
80
- $("#jTreeHelper").empty().hide();
81
- $(".jTreePlacement").remove();
82
- $(cur).show();
83
- }
84
- );
85
- destroyBindings();
86
- }
87
- cur = 0;
88
- return false;
89
- });
90
- //functions are written here
91
- var doNothing = function(){
92
- return false;
93
- };
94
-
95
- var destroyBindings = function(){
96
- $(document).unbind("selectstart", doNothing);
97
- $(container).find("li").unbind("dblclick", doNothing);
98
- $(container).find("li").unbind("mouseover", getInitial);
99
- $(container).find("li").unbind("mousemove", putPlacement);
100
- $(document).unbind("mousemove", helperPosition);
101
- };
102
-
103
- var helperPosition = function(e) {
104
- $("#jTreeHelper").css ({
105
- top: e.pageY + 5,
106
- left: e.pageX + 5
107
- });
108
-
109
- $(".jTreePlacement").remove();
110
- };
111
-
112
- var getInitial = function(e){
113
- off = $(this).offset();
114
- h = $(this).height();
115
- w = $(this).width();
116
- hover = this;
117
- return false;
118
- };
119
-
120
- var putPlacement = function(e){
121
- $(cur).hide();
122
- $("#jTreeHelper").css ({
123
- top: e.pageY + 5,
124
- left: e.pageX + 5
125
- });
126
-
127
- //inserting before
128
- if ( e.pageY >= off.top && e.pageY < (off.top + h/2 - 1) ) {
129
- if (!$(this).prev().hasClass("jTreePlacement")) {
130
- $(".jTreePlacement").remove();
131
- $(this).before(str);
132
- }
133
- }
134
- //inserting after
135
- else if (e.pageY >(off.top + h/2) && e.pageY <= (off.top + h) ) {
136
- // as a sibling
137
- if (e.pageY > off.left && e.pageX < off.left + opts.childOff) {
138
- if (!$(this).next().hasClass("jTreePlacement")) {
139
- $(".jTreePlacement").remove();
140
- $(this).after(str);
141
- }
142
- }
143
- // as a child
144
- else if (e.pageX > off.left + opts.childOff) {
145
-
146
- $(".jTreePlacement").remove();
147
- if ($(this).find("ul").length == 0)
148
- $(this).append('<ul>'+str+'</ul>');
149
- else
150
- $(this).find("ul").prepend(str);
151
- }
152
- }
153
- return false;
154
- }
155
-
156
- var lockIn = function(e) {
157
- // if placement box is present, insert before placement box
158
- if ($(".jTreePlacement").length==1) {
159
- $(cur).insertBefore(".jTreePlacement");
160
- }
161
- $(cur).show();
162
-
163
- // remove helper and placement box
164
- $("#jTreeHelper").empty().hide();
165
-
166
- $(".jTreePlacement").remove();;
167
- }
168
-
169
- }; // end jTree
170
-
171
-
172
- $.fn.jTree.defaults = {
173
- showHelper: false,
174
- hOpacity: 0.5,
175
- hBg: "#FCC",
176
- hColor: "#222",
177
- pBorder: "1px dashed #CCC",
178
- pBg: "#EEE",
179
- pColor: "#222",
180
- pHeight: "20px",
181
- childOff: 20,
182
- snapBack: 1000
183
- };
184
-
185
- })(jQuery);
186
-
187
-
@@ -1 +0,0 @@
1
- (function(A){A.fn.jTree=function(Q){var C=A.extend({},A.fn.jTree.defaults,Q);var O=0,M=0,E=0,F=0,N=0,I=0;var K='<li class="jTreePlacement" style="background:'+C.pBg+";border:"+C.pBorder+";color:"+C.pColor+";height:"+C.pHeight+'"></li>';var D=this;A(this).find("li").mousedown(function(R){if(A("#jTreeHelper").is(":not(:animated)")&&R.button!=2){A("body").append(K);A(".jTreePlacement").hide();A(this).clone().appendTo("#jTreeHelper");O=this;M=A(O).offset();A(O).hide();A("#jTreeHelper").css({position:"absolute",top:R.pageY+5,left:R.pageX+5,background:C.hBg,opacity:C.hOpacity}).show();A("#jTreeHelper *").css({color:C.hColor,background:C.hBg,});A(document).bind("selectstart",G);A(D).find("li").bind("dblclick",G);A(D).find("li").bind("mouseover",H);A(D).find("li").bind("mousemove",J);A(document).bind("mousemove",P)}return false});A(this).find("li").andSelf().mouseup(function(R){if(A(".jTreePlacement").is(":visible")){A(O).insertBefore(".jTreePlacement").show()}A(O).show();A(D).find("ul:empty").remove();A("#jTreeHelper").empty().hide();A(".jTreePlacement").remove();B();return false});A(document).mouseup(function(R){if(O!=0){A("#jTreeHelper").animate({top:M.top,left:M.left},C.snapBack,function(){A("#jTreeHelper").empty().hide();A(".jTreePlacement").remove();A(O).show()});B()}O=0;return false});var G=function(){return false};var B=function(){A(document).unbind("selectstart",G);A(D).find("li").unbind("dblclick",G);A(D).find("li").unbind("mouseover",H);A(D).find("li").unbind("mousemove",J);A(document).unbind("mousemove",P)};var P=function(R){A("#jTreeHelper").css({top:R.pageY+5,left:R.pageX+5});A(".jTreePlacement").remove()};var H=function(R){E=A(this).offset();F=A(this).height();N=A(this).width();I=this;return false};var J=function(R){A(O).hide();A("#jTreeHelper").css({top:R.pageY+5,left:R.pageX+5});if(R.pageY>=E.top&&R.pageY<(E.top+F/2-1)){if(!A(this).prev().hasClass("jTreePlacement")){A(".jTreePlacement").remove();A(this).before(K)}}else{if(R.pageY>(E.top+F/2)&&R.pageY<=(E.top+F)){if(R.pageY>E.left&&R.pageX<E.left+C.childOff){if(!A(this).next().hasClass("jTreePlacement")){A(".jTreePlacement").remove();A(this).after(K)}}else{if(R.pageX>E.left+C.childOff){A(".jTreePlacement").remove();if(A(this).find("ul").length==0){A(this).append("<ul>"+K+"</ul>")}else{A(this).find("ul").prepend(K)}}}}}return false};var L=function(R){if(A(".jTreePlacement").length==1){A(O).insertBefore(".jTreePlacement")}A(O).show();A("#jTreeHelper").empty().hide();A(".jTreePlacement").remove()}};A.fn.jTree.defaults={showHelper:false,hOpacity:0.5,hBg:"#FCC",hColor:"#222",pBorder:"1px dashed #CCC",pBg:"#EEE",pColor:"#222",pHeight:"20px",childOff:20,snapBack:1000}})(jQuery);
@@ -1,193 +0,0 @@
1
- // JavaScript Document
2
- (function($) {
3
-
4
- $.fn.jTree = function(options) {
5
- var opts = $.extend({}, $.fn.jTree.defaults, options);
6
- var cur = 0, curOff = 0, off =0, h =0, w=0, hover = 0;
7
- var str='<li class="jTreePlacement" style="background:'+opts.pBg+';border:'+opts.pBorder+';color:'+opts.pColor+';height:'+opts.pHeight+'"></li>';
8
- var container = this;
9
- $("body").append(str);
10
- $(".jTreePlacement").hide();
11
- //events are written here
12
- $(this).find("li").draggable({
13
- start: function(){
14
-
15
- }
16
- })
17
- $(this).find("li").mousedown(function(e){
18
- if ($("#jTreeHelper").is(":not(:animated)") && e.button !=2) {
19
- // append jTreePlacement to body and hides
20
-
21
- //get the current li and append to helper
22
- $(this).clone().appendTo("#jTreeHelper");
23
-
24
- // get initial state, cur and offset
25
- cur = this;
26
- curOff = $(cur).offset();
27
- $(cur).hide();
28
- // show initial helper
29
- $("#jTreeHelper").css ({
30
- position: "absolute",
31
- top: e.pageY + 5,
32
- left: e.pageX + 5,
33
- background: opts.hBg,
34
- opacity: opts.hOpacity
35
- }).show();
36
- $("#jTreeHelper *").css ({
37
- color: opts.hColor,
38
- background: opts.hBg
39
- });
40
- // start binding events to use
41
- // prevent text selection
42
- $(document).bind("selectstart", doNothing);
43
-
44
- // doubleclick is destructive, better disable
45
- $(container).find("li").bind("dblclick", doNothing);
46
-
47
- // in single li calculate the offset, width height of hovered block
48
- $(container).find("li").bind("mouseover", getInitial);
49
-
50
- // in single li put placement in correct places, also move the helper around
51
- $(container).find("li").bind("mousemove", putPlacement);
52
-
53
- // handle mouse movement outside our container
54
- $(document).bind("mousemove", helperPosition);
55
- }
56
- //prevent bubbling of mousedown
57
- return false;
58
- });
59
-
60
- // in single li or in container, snap into placement if present then destroy placement
61
- // and helper then show snapped in object/li
62
- // also destroys events
63
- $(this).find("li").andSelf().mouseup(function(e){
64
- // if placementBox is detected
65
- if ($(".jTreePlacement").is(":visible")) {
66
- $(cur).insertBefore(".jTreePlacement").show();
67
- }
68
- $(cur).show();
69
- // remove helper and placement box
70
- $(container).find("ul:empty").remove();
71
- $("#jTreeHelper").empty().hide();
72
- $(".jTreePlacement").remove();
73
-
74
- // remove bindings
75
- destroyBindings();
76
-
77
- return false;
78
- });
79
-
80
- $(document).mouseup(function(e){
81
- if (cur!=0) {
82
- $("#jTreeHelper").animate({
83
- top: curOff.top,
84
- left: curOff.left
85
- }, opts.snapBack, function(){
86
- $("#jTreeHelper").empty().hide();
87
- $(".jTreePlacement").remove();
88
- $(cur).show();
89
- }
90
- );
91
- destroyBindings();
92
- }
93
- cur = 0;
94
- return false;
95
- });
96
- //functions are written here
97
- var doNothing = function(){
98
- return false;
99
- };
100
-
101
- var destroyBindings = function(){
102
- $(document).unbind("selectstart", doNothing);
103
- $(container).find("li").unbind("dblclick", doNothing);
104
- $(container).find("li").unbind("mouseover", getInitial);
105
- $(container).find("li").unbind("mousemove", putPlacement);
106
- $(document).unbind("mousemove", helperPosition);
107
- };
108
-
109
- var helperPosition = function(e) {
110
- $("#jTreeHelper").css ({
111
- top: e.pageY + 5,
112
- left: e.pageX + 5
113
- });
114
-
115
- $(".jTreePlacement").remove();
116
- };
117
-
118
- var getInitial = function(e){
119
- off = $(this).offset();
120
- h = $(this).height();
121
- w = $(this).width();
122
- hover = this;
123
- return false;
124
- };
125
-
126
- var putPlacement = function(e){
127
- $(cur).hide();
128
- $("#jTreeHelper").css ({
129
- top: e.pageY + 5,
130
- left: e.pageX + 5
131
- });
132
-
133
- //inserting before
134
- if ( e.pageY >= off.top && e.pageY < (off.top + h/2 - 1) ) {
135
- if (!$(this).prev().hasClass("jTreePlacement")) {
136
- $(".jTreePlacement").remove();
137
- $(this).before(str);
138
- }
139
- }
140
- //inserting after
141
- else if (e.pageY >(off.top + h/2) && e.pageY <= (off.top + h) ) {
142
- // as a sibling
143
- if (e.pageY > off.left && e.pageX < off.left + opts.childOff) {
144
- if (!$(this).next().hasClass("jTreePlacement")) {
145
- $(".jTreePlacement").remove();
146
- $(this).after(str);
147
- }
148
- }
149
- // as a child
150
- else if (e.pageX > off.left + opts.childOff) {
151
-
152
- $(".jTreePlacement").remove();
153
- if ($(this).find("ul").length == 0)
154
- $(this).append('<ul>'+str+'</ul>');
155
- else
156
- $(this).find("ul").prepend(str);
157
- }
158
- }
159
- return false;
160
- };
161
-
162
- var lockIn = function(e) {
163
- // if placement box is present, insert before placement box
164
- if ($(".jTreePlacement").length==1) {
165
- $(cur).insertBefore(".jTreePlacement");
166
- }
167
- $(cur).show();
168
-
169
- // remove helper and placement box
170
- $("#jTreeHelper").empty().hide();
171
-
172
- $(".jTreePlacement").remove();;
173
- };
174
-
175
- }; // end jTree
176
-
177
-
178
- $.fn.jTree.defaults = {
179
- showHelper: false,
180
- hOpacity: 0.5,
181
- hBg: "#FCC",
182
- hColor: "#222",
183
- pBorder: "1px dashed #CCC",
184
- pBg: "#EEE",
185
- pColor: "#222",
186
- pHeight: "20px",
187
- childOff: 20,
188
- snapBack: 1000
189
- };
190
-
191
- })(jQuery);
192
-
193
-
@@ -1,10 +0,0 @@
1
- module Spider; module Forms
2
-
3
- class SubForm < Input
4
- tag 'subform'
5
-
6
- i_attr_accessor :model
7
-
8
- end
9
-
10
- end; end
@@ -1,5 +0,0 @@
1
- <div>
2
- <div sp:if="!@value && !@shown">
3
- Crea nuovo: <input type="checkbox" name="{ @name }[create]" value="true">
4
- <forms:form id="form" model="@model" />
5
- </div>
@@ -1,3 +0,0 @@
1
- Spider::Worker.every('2m') do
2
- Spider::Messenger.process_queue(:email)
3
- end
@@ -1,14 +0,0 @@
1
- require 'spiderfw/controller/mixins/static_content'
2
-
3
- module Spider
4
-
5
- class AppController < Controller
6
- # FIXME: should extend PageController, but there are some circular dependencies to sort out.
7
- include Visual
8
- include StaticContent
9
- include WidgetHelper
10
-
11
-
12
- end
13
-
14
- end
@@ -1,24 +0,0 @@
1
- require 'test/unit'
2
-
3
- module Spider
4
-
5
- class TestCase < Test::Unit::TestCase
6
-
7
- def self.standalone
8
- @standalone
9
- end
10
-
11
- def setup
12
- Spider._test_setup if self.class.standalone
13
- end
14
-
15
- def teardown
16
- Spider._test_teardown if self.class.standalone
17
- end
18
-
19
- def test_dummy
20
- end
21
-
22
- end
23
-
24
- end