forgeos_core 1.9.1 → 1.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. data/COPYING +339 -0
  2. data/COPYING.LESSER +165 -0
  3. data/app/assets/images/forgeos/dataTables/Sorting icons.psd +0 -0
  4. data/app/assets/images/forgeos/dataTables/back_disabled.jpg +0 -0
  5. data/app/assets/images/forgeos/dataTables/back_enabled.jpg +0 -0
  6. data/app/assets/images/forgeos/dataTables/favicon.ico +0 -0
  7. data/app/assets/images/forgeos/dataTables/forward_disabled.jpg +0 -0
  8. data/app/assets/images/forgeos/dataTables/forward_enabled.jpg +0 -0
  9. data/app/assets/images/forgeos/dataTables/sort_asc.png +0 -0
  10. data/app/assets/images/forgeos/dataTables/sort_asc_disabled.png +0 -0
  11. data/app/assets/images/forgeos/dataTables/sort_both.png +0 -0
  12. data/app/assets/images/forgeos/dataTables/sort_desc.png +0 -0
  13. data/app/assets/images/forgeos/dataTables/sort_desc_disabled.png +0 -0
  14. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/bubble-quantity-products.png +0 -0
  15. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/check-checked.png +0 -0
  16. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/check-unchecked.png +0 -0
  17. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/context.gif +0 -0
  18. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/create.png +0 -0
  19. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/dark-blue-minus.png +0 -0
  20. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/dark-blue-plus.png +0 -0
  21. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/dot.gif +0 -0
  22. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/f.png +0 -0
  23. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/fminus.gif +0 -0
  24. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/fminus_rtl.gif +0 -0
  25. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/folder.png +0 -0
  26. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/fplus.gif +0 -0
  27. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/fplus_rtl.gif +0 -0
  28. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/lastli.gif +0 -0
  29. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/lastli_rtl.gif +0 -0
  30. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/li.gif +0 -0
  31. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/remove.png +0 -0
  32. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/rename.png +0 -0
  33. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/throbber.gif +0 -0
  34. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/brown-minus.png +0 -0
  35. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/brown-plus.png +0 -0
  36. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/bubble-quantity-elements.png +0 -0
  37. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/context.gif +0 -0
  38. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/create.png +0 -0
  39. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/dot.gif +0 -0
  40. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/f.png +0 -0
  41. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/fminus.gif +0 -0
  42. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/fminus_rtl.gif +0 -0
  43. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/fplus.gif +0 -0
  44. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/fplus_rtl.gif +0 -0
  45. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/images.png +0 -0
  46. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/lastli.gif +0 -0
  47. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/lastli_rtl.gif +0 -0
  48. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/li.gif +0 -0
  49. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/remove.png +0 -0
  50. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/rename.png +0 -0
  51. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/throbber.gif +0 -0
  52. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/marker.gif +0 -0
  53. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/marker_rtl.gif +0 -0
  54. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/plus.gif +0 -0
  55. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/remove.gif +0 -0
  56. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/remove.png +0 -0
  57. data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/commons.js +8 -3
  58. data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/dataTable.js +2 -2
  59. data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/tinyMCE.js +1 -1
  60. data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/trees.js +202 -257
  61. data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/left-sidebar.js +16 -23
  62. data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/settings.js +5 -5
  63. data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/tabs.js +3 -3
  64. data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/trees.js +2 -45
  65. data/app/assets/javascripts/forgeos/jquery.dataTables.min.js +138 -529
  66. data/app/assets/javascripts/forgeos/jstree/jquery.jstree.js +4544 -0
  67. data/app/assets/stylesheets/forgeos/admin/forgeos_core/_lightbox.css.sass +2 -21
  68. data/app/assets/stylesheets/forgeos/admin/forgeos_core/_settings.css.sass +77 -39
  69. data/app/assets/stylesheets/forgeos/dataTables/demo_table.css +150 -27
  70. data/app/assets/stylesheets/forgeos/jstree/themes/association_categories/style.css.sass +36 -154
  71. data/app/assets/stylesheets/forgeos/jstree/themes/categories/style.css.sass +59 -58
  72. data/app/controllers/admin/accounts_controller.rb +1 -1
  73. data/app/controllers/admin/administrators_controller.rb +13 -4
  74. data/app/controllers/admin/attachments_controller.rb +7 -3
  75. data/app/controllers/admin/base_controller.rbc +1305 -0
  76. data/app/controllers/admin/categories_controller.rb +1 -1
  77. data/app/controllers/admin/dashboard_controller.rbc +361 -0
  78. data/app/controllers/admin/person_sessions_controller.rbc +1248 -0
  79. data/app/controllers/admin/rights_controller.rb +6 -6
  80. data/app/controllers/admin/roles_controller.rb +8 -3
  81. data/app/controllers/admin/users_controller.rb +12 -6
  82. data/app/controllers/forgeos/application_controller.rb +1 -2
  83. data/app/controllers/forgeos/application_controller.rbc +2027 -0
  84. data/app/helpers/admin/attachment_helper.rbc +2340 -0
  85. data/app/helpers/admin/base_helper.rb +0 -15
  86. data/app/helpers/admin/base_helper.rbc +2522 -0
  87. data/app/helpers/forgeos/application_helper.rbc +3152 -0
  88. data/app/models/administrator.rbc +415 -0
  89. data/app/models/category.rb +3 -3
  90. data/app/models/person.rb +5 -9
  91. data/app/models/person.rbc +1498 -0
  92. data/app/models/person_session.rbc +142 -0
  93. data/app/models/right.rbc +432 -0
  94. data/app/models/role.rbc +469 -0
  95. data/app/models/setting.rbc +699 -0
  96. data/app/views/admin/accounts/_form.html.haml +1 -1
  97. data/app/views/admin/administrators/activate.js.erb +1 -0
  98. data/app/views/admin/administrators/destroy.js.erb +1 -0
  99. data/app/views/admin/administrators/index.json.erb +10 -12
  100. data/app/views/admin/attachments/_form.html.haml +2 -2
  101. data/app/views/admin/attachments/destroy.js.erb +1 -0
  102. data/app/views/admin/attachments/index.json.erb +4 -5
  103. data/app/views/admin/categories/_associated_elements.html.haml +4 -8
  104. data/app/views/admin/categories/index.json.erb +1 -1
  105. data/app/views/admin/rights/destroy.js.erb +1 -0
  106. data/app/views/admin/rights/index.json.erb +5 -6
  107. data/app/views/admin/roles/activate.js.erb +1 -0
  108. data/app/views/admin/roles/destroy.js.erb +1 -0
  109. data/app/views/admin/roles/index.json.erb +10 -12
  110. data/app/views/admin/settings/_tabs.html.haml +0 -6
  111. data/app/views/admin/settings/edit.html.haml +19 -16
  112. data/app/views/admin/sidebars/_attachments_popups.html.haml +1 -1
  113. data/app/views/admin/sidebars/_left_sidebar.html.haml +2 -2
  114. data/app/views/admin/users/activate.js.erb +1 -0
  115. data/app/views/admin/users/destroy.js.erb +1 -0
  116. data/app/views/admin/users/index.json.erb +8 -11
  117. data/app/views/admin/visual/_visual_popup.html.haml +2 -2
  118. data/app/views/admin/visual/_visuals_popup.html.haml +1 -1
  119. data/app/views/layouts/admin.html.haml +5 -4
  120. data/app/views/layouts/admin_login.html.haml +3 -3
  121. data/config/initializers/load_settings.rbc +330 -0
  122. data/config/routes.rb +5 -8
  123. data/config/routes.rbc +2203 -0
  124. data/lib/extensions/form_helper_extensions.rb +2 -2
  125. data/lib/extensions/form_helper_extensions.rbc +295 -0
  126. data/lib/extensions/i18n_fallbacks_config.rbc +246 -0
  127. data/lib/extensions.rbc +126 -0
  128. data/lib/forgeos/core/engine.rbc +316 -0
  129. data/lib/forgeos/core.rbc +325 -0
  130. data/lib/forgeos.rbc +1942 -0
  131. data/lib/forgeos_core.rbc +53 -0
  132. data/lib/map_fields.rbc +4437 -0
  133. data/lib/sortable_attachments.rbc +1399 -0
  134. data/lib/sphinx_globalize.rbc +785 -0
  135. metadata +286 -53
  136. data/app/assets/javascripts/forgeos/jstree/jquery.tree.js +0 -2061
  137. data/app/assets/javascripts/forgeos/jstree/plugins/jquery.tree.contextmenu.js +0 -129
  138. data/app/assets/javascripts/forgeos/jstree/plugins/jquery.tree.cookie.js +0 -70
  139. data/app/assets/stylesheets/forgeos/jquery.selectbox.css +0 -75
  140. data/app/assets/stylesheets/forgeos/jstree/themes/categories/style.css +0 -106
  141. data/app/assets/stylesheets/forgeos/jstree/tree_component.css.sass +0 -204
@@ -1,74 +1,73 @@
1
- .tree-categories
1
+ .jstree.jstree-categories
2
2
  ul
3
- display: block
4
3
  padding: 0
5
4
  margin: 0
6
5
 
7
6
  li
8
7
  margin: 2px 0
9
- display: block !important
10
8
  width: auto !important
11
9
  float: none !important
12
10
 
13
- &.open
14
- background: url("brown-minus.png") 0px 3px no-repeat
15
-
16
- &.closed
17
- background: url("brown-plus.png") 0 3px no-repeat
18
-
19
-
20
- #jstree-dragged.tree-categories li li.open
21
- background: url("brown-plus.png") 0 3px no-repeat
22
-
23
-
24
- .tree.tree-categories li
25
- a
26
- padding: 3px 24px !important
27
- color: #75491B
28
- font-weight: bold
29
- font-size: 0.8em
30
- background-position: 0 -271px
31
- display: block
32
- position: relative
33
- &:hover, &.hover
34
- background-color: #FDD794
35
- color: #F16028
36
-
37
- &.clicked
38
- background-color: #FDD794
39
- color: #F16028
40
-
41
- &:hover
11
+ &.jstree-open
12
+ ins
13
+ background: url("brown-minus.png") 0px 3px no-repeat
14
+ &.jstree-closed
15
+ ins
16
+ background: url("brown-plus.png") 0 3px no-repeat
17
+ ul
18
+ display: none
19
+ ul li > ins.jstree-icon
20
+ background: none
21
+ a
22
+ color: #75491B
23
+ font-weight: bold
24
+ font-size: 0.8em
25
+ position: relative
26
+ &:hover, &.hover
42
27
  background-color: #FDD794
43
28
  color: #F16028
44
- ins
45
- margin: 0
46
- display: none
47
29
 
48
- span
49
- height: 13px
50
- width: 19px
51
- font-size: 0.7em
52
- background-image: url("bubble-quantity-elements.png")
53
- background-repeat: no-repeat
54
- background-position: -1px -5px
55
- text-align: center
56
- color: #75491B
57
- position: absolute
58
- right: 5px
59
- top: 5px
60
- line-height: 1.4em
61
- padding: 0px 5px 2px 1px
62
- &.clicked
30
+ &.jstree-clicked
63
31
  background-color: #FDD794
64
32
  color: #F16028
65
- padding: 0px 3px 0px 20px
66
-
67
- .tree.tree-categories li a.loading
68
- background: none
69
33
 
70
-
71
- .tree-categories-context
34
+ &:hover
35
+ background-color: #FDD794
36
+ color: #F16028
37
+ ins.jstree-icon
38
+ margin: 0
39
+ background-image: url(/assets/forgeos/admin/big-icons-24-24-verti.png) !important
40
+ background-repeat: no-repeat
41
+ width: 25px
42
+ background-position: 0 -271px
43
+
44
+ span
45
+ float: right
46
+ height: 13px
47
+ width: 19px
48
+ font-size: 0.7em
49
+ background:
50
+ image: url("bubble-quantity-elements.png")
51
+ repeat: no-repeat
52
+ position: -1px -5px
53
+ text-align: center
54
+ color: #75491B
55
+ position: absolute
56
+ right: 5px
57
+ top: 5px
58
+ line-height: 1.4em
59
+ padding: 0px 5px 2px 1px
60
+ &.jstree-clicked
61
+ span
62
+ background-color: #FDD794
63
+ color: #F16028
64
+ padding: 0px 3px 0px 20px
65
+
66
+ &.jstree-loading
67
+ background: none
68
+
69
+
70
+ .jstree-categories-context
72
71
  width: 160px
73
72
  background: #FFF
74
73
  border: 1px solid #AEB0B2
@@ -83,7 +82,7 @@
83
82
  line-height: 20px
84
83
  margin: 0
85
84
 
86
- &.disabled:hover
85
+ &.jstree-disabled:hover
87
86
  display: block
88
87
  text-decoration: none
89
88
  border-bottom: 1px solid #AEB0B2
@@ -97,7 +96,7 @@
97
96
  color: #2973BD
98
97
  border-bottom: 1px solid #AEB0B2
99
98
 
100
- &.disabled
99
+ &.jstree-disabled
101
100
  color: silver
102
101
  opacity: 0.5
103
102
  -ms-filter: 'alpha(opacity=50)'
@@ -124,3 +123,5 @@
124
123
  margin: 0 !important
125
124
  .separator
126
125
  display: none !important
126
+ #jstree-dragged.jstree-categories li li.open
127
+ background: url("brown-plus.png") 0 3px no-repeat
@@ -26,7 +26,7 @@ class Admin::AccountsController < Admin::BaseController
26
26
  def update
27
27
  @user = current_user
28
28
  respond_to do |format|
29
- if @user.update_attributes(params[:account])
29
+ if @user.update_attributes(params[:administrator])
30
30
  flash[:notice] = t('my_account.update.success').capitalize
31
31
  format.xml { head :ok }
32
32
  else
@@ -42,16 +42,25 @@ class Admin::AdministratorsController < Admin::BaseController
42
42
  end
43
43
 
44
44
  def destroy
45
- if request.delete? && @admin.destroy
45
+ if @admin.destroy
46
46
  flash[:notice] = t('admin.destroy.success').capitalize
47
47
  else
48
48
  flash[:error] = t('admin.destroy.failed').capitalize
49
49
  end
50
- redirect_to([forgeos_core, :admin, :administrators])
50
+ respond_to do |wants|
51
+ wants.html do
52
+ redirect_to([forgeos_core, :admin, :administrators])
53
+ end
54
+ wants.js
55
+ end
51
56
  end
52
57
 
53
58
  def activate
54
- render :text => (@admin.active? ? @admin.disactivate : @admin.activate)
59
+ if @admin.active?
60
+ @admin.disactivate
61
+ else
62
+ @admin.activate
63
+ end
55
64
  end
56
65
  private
57
66
 
@@ -68,7 +77,7 @@ private
68
77
  offset = params[:iDisplayStart].to_i
69
78
  page = (offset / per_page) + 1
70
79
  order_column = params[:iSortCol_0].to_i
71
- order = "#{columns[order_column]} #{params[:iSortDir_0].upcase}"
80
+ order = "#{columns[order_column]} #{params[:sSortDir_0].upcase}"
72
81
 
73
82
  conditions = {}
74
83
  includes = []
@@ -124,8 +124,12 @@ class Admin::AttachmentsController < Admin::BaseController
124
124
  else
125
125
  flash[:notice] = I18n.t('media.destroy.failed').capitalize
126
126
  end
127
- return render(:nothing => true) if request.xhr?
128
- return redirect_to(forgeos_core.admin_attachments_path(:file_type => @media.class.to_s.underscore))
127
+ respond_to do |wants|
128
+ wants.html do
129
+ redirect_to(forgeos_core.admin_attachments_path(:file_type => @media.class.to_s.underscore))
130
+ end
131
+ wants.js
132
+ end
129
133
  end
130
134
 
131
135
  private
@@ -157,7 +161,7 @@ class Admin::AttachmentsController < Admin::BaseController
157
161
  per_page = params[:iDisplayLength].to_i
158
162
  offset = params[:iDisplayStart].to_i
159
163
  page = (offset / per_page) + 1
160
- order = "#{columns[params[:iSortCol_0].to_i]} #{params[:iSortDir_0].upcase}"
164
+ order = "#{columns[params[:iSortCol_0].to_i]} #{params[:sSortDir_0].upcase}"
161
165
 
162
166
  conditions = { :parent_id => nil }
163
167
  includes = []