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.
- data/COPYING +339 -0
- data/COPYING.LESSER +165 -0
- data/app/assets/images/forgeos/dataTables/Sorting icons.psd +0 -0
- data/app/assets/images/forgeos/dataTables/back_disabled.jpg +0 -0
- data/app/assets/images/forgeos/dataTables/back_enabled.jpg +0 -0
- data/app/assets/images/forgeos/dataTables/favicon.ico +0 -0
- data/app/assets/images/forgeos/dataTables/forward_disabled.jpg +0 -0
- data/app/assets/images/forgeos/dataTables/forward_enabled.jpg +0 -0
- data/app/assets/images/forgeos/dataTables/sort_asc.png +0 -0
- data/app/assets/images/forgeos/dataTables/sort_asc_disabled.png +0 -0
- data/app/assets/images/forgeos/dataTables/sort_both.png +0 -0
- data/app/assets/images/forgeos/dataTables/sort_desc.png +0 -0
- data/app/assets/images/forgeos/dataTables/sort_desc_disabled.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/bubble-quantity-products.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/check-checked.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/check-unchecked.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/context.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/create.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/dark-blue-minus.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/dark-blue-plus.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/dot.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/f.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/fminus.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/fminus_rtl.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/folder.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/fplus.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/fplus_rtl.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/lastli.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/lastli_rtl.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/li.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/remove.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/rename.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/throbber.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/brown-minus.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/brown-plus.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/bubble-quantity-elements.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/context.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/create.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/dot.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/f.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/fminus.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/fminus_rtl.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/fplus.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/fplus_rtl.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/images.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/lastli.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/lastli_rtl.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/li.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/remove.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/rename.png +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/throbber.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/marker.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/marker_rtl.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/plus.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/remove.gif +0 -0
- data/app/assets/{stylesheets → images}/forgeos/jstree/themes/remove.png +0 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/commons.js +8 -3
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/dataTable.js +2 -2
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/tinyMCE.js +1 -1
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/trees.js +202 -257
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/left-sidebar.js +16 -23
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/settings.js +5 -5
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/tabs.js +3 -3
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/trees.js +2 -45
- data/app/assets/javascripts/forgeos/jquery.dataTables.min.js +138 -529
- data/app/assets/javascripts/forgeos/jstree/jquery.jstree.js +4544 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_lightbox.css.sass +2 -21
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_settings.css.sass +77 -39
- data/app/assets/stylesheets/forgeos/dataTables/demo_table.css +150 -27
- data/app/assets/stylesheets/forgeos/jstree/themes/association_categories/style.css.sass +36 -154
- data/app/assets/stylesheets/forgeos/jstree/themes/categories/style.css.sass +59 -58
- data/app/controllers/admin/accounts_controller.rb +1 -1
- data/app/controllers/admin/administrators_controller.rb +13 -4
- data/app/controllers/admin/attachments_controller.rb +7 -3
- data/app/controllers/admin/base_controller.rbc +1305 -0
- data/app/controllers/admin/categories_controller.rb +1 -1
- data/app/controllers/admin/dashboard_controller.rbc +361 -0
- data/app/controllers/admin/person_sessions_controller.rbc +1248 -0
- data/app/controllers/admin/rights_controller.rb +6 -6
- data/app/controllers/admin/roles_controller.rb +8 -3
- data/app/controllers/admin/users_controller.rb +12 -6
- data/app/controllers/forgeos/application_controller.rb +1 -2
- data/app/controllers/forgeos/application_controller.rbc +2027 -0
- data/app/helpers/admin/attachment_helper.rbc +2340 -0
- data/app/helpers/admin/base_helper.rb +0 -15
- data/app/helpers/admin/base_helper.rbc +2522 -0
- data/app/helpers/forgeos/application_helper.rbc +3152 -0
- data/app/models/administrator.rbc +415 -0
- data/app/models/category.rb +3 -3
- data/app/models/person.rb +5 -9
- data/app/models/person.rbc +1498 -0
- data/app/models/person_session.rbc +142 -0
- data/app/models/right.rbc +432 -0
- data/app/models/role.rbc +469 -0
- data/app/models/setting.rbc +699 -0
- data/app/views/admin/accounts/_form.html.haml +1 -1
- data/app/views/admin/administrators/activate.js.erb +1 -0
- data/app/views/admin/administrators/destroy.js.erb +1 -0
- data/app/views/admin/administrators/index.json.erb +10 -12
- data/app/views/admin/attachments/_form.html.haml +2 -2
- data/app/views/admin/attachments/destroy.js.erb +1 -0
- data/app/views/admin/attachments/index.json.erb +4 -5
- data/app/views/admin/categories/_associated_elements.html.haml +4 -8
- data/app/views/admin/categories/index.json.erb +1 -1
- data/app/views/admin/rights/destroy.js.erb +1 -0
- data/app/views/admin/rights/index.json.erb +5 -6
- data/app/views/admin/roles/activate.js.erb +1 -0
- data/app/views/admin/roles/destroy.js.erb +1 -0
- data/app/views/admin/roles/index.json.erb +10 -12
- data/app/views/admin/settings/_tabs.html.haml +0 -6
- data/app/views/admin/settings/edit.html.haml +19 -16
- data/app/views/admin/sidebars/_attachments_popups.html.haml +1 -1
- data/app/views/admin/sidebars/_left_sidebar.html.haml +2 -2
- data/app/views/admin/users/activate.js.erb +1 -0
- data/app/views/admin/users/destroy.js.erb +1 -0
- data/app/views/admin/users/index.json.erb +8 -11
- data/app/views/admin/visual/_visual_popup.html.haml +2 -2
- data/app/views/admin/visual/_visuals_popup.html.haml +1 -1
- data/app/views/layouts/admin.html.haml +5 -4
- data/app/views/layouts/admin_login.html.haml +3 -3
- data/config/initializers/load_settings.rbc +330 -0
- data/config/routes.rb +5 -8
- data/config/routes.rbc +2203 -0
- data/lib/extensions/form_helper_extensions.rb +2 -2
- data/lib/extensions/form_helper_extensions.rbc +295 -0
- data/lib/extensions/i18n_fallbacks_config.rbc +246 -0
- data/lib/extensions.rbc +126 -0
- data/lib/forgeos/core/engine.rbc +316 -0
- data/lib/forgeos/core.rbc +325 -0
- data/lib/forgeos.rbc +1942 -0
- data/lib/forgeos_core.rbc +53 -0
- data/lib/map_fields.rbc +4437 -0
- data/lib/sortable_attachments.rbc +1399 -0
- data/lib/sphinx_globalize.rbc +785 -0
- metadata +286 -53
- data/app/assets/javascripts/forgeos/jstree/jquery.tree.js +0 -2061
- data/app/assets/javascripts/forgeos/jstree/plugins/jquery.tree.contextmenu.js +0 -129
- data/app/assets/javascripts/forgeos/jstree/plugins/jquery.tree.cookie.js +0 -70
- data/app/assets/stylesheets/forgeos/jquery.selectbox.css +0 -75
- data/app/assets/stylesheets/forgeos/jstree/themes/categories/style.css +0 -106
- data/app/assets/stylesheets/forgeos/jstree/tree_component.css.sass +0 -204
@@ -55,15 +55,15 @@ class Admin::RightsController < Admin::BaseController
|
|
55
55
|
def destroy
|
56
56
|
if @right.destroy
|
57
57
|
flash[:notice] = I18n.t('right.destroy.success').capitalize
|
58
|
-
return request.xhr? ? (render :nothing => true) : redirect_to([forgeos_core, :admin, :rights])
|
59
58
|
else
|
60
59
|
flash[:error] = I18n.t('right.destroy.failed').capitalize
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
60
|
+
end
|
61
|
+
|
62
|
+
respond_to do |wants|
|
63
|
+
wants.html do
|
65
64
|
redirect_to([forgeos_core, :admin, :rights])
|
66
65
|
end
|
66
|
+
wants.js
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
@@ -81,7 +81,7 @@ private
|
|
81
81
|
per_page = params[:iDisplayLength].to_i
|
82
82
|
offset = params[:iDisplayStart].to_i
|
83
83
|
page = (offset / per_page) + 1
|
84
|
-
order = "#{columns[params[:iSortCol_0].to_i]} #{params[:
|
84
|
+
order = "#{columns[params[:iSortCol_0].to_i]} #{params[:sSortDir_0].upcase}"
|
85
85
|
|
86
86
|
conditions = {}
|
87
87
|
includes = []
|
@@ -51,7 +51,12 @@ class Admin::RolesController < Admin::BaseController
|
|
51
51
|
else
|
52
52
|
flash[:error] = I18n.t('role.destroy.failed').capitalize
|
53
53
|
end
|
54
|
-
|
54
|
+
respond_to do |wants|
|
55
|
+
wants.html do
|
56
|
+
redirect_to([forgeos_core,:admin,:roles])
|
57
|
+
end
|
58
|
+
wants.js
|
59
|
+
end
|
55
60
|
end
|
56
61
|
|
57
62
|
def rights
|
@@ -64,7 +69,7 @@ class Admin::RolesController < Admin::BaseController
|
|
64
69
|
end
|
65
70
|
|
66
71
|
def activate
|
67
|
-
|
72
|
+
@role.activate
|
68
73
|
end
|
69
74
|
|
70
75
|
private
|
@@ -86,7 +91,7 @@ private
|
|
86
91
|
offset = params[:iDisplayStart].to_i
|
87
92
|
page = (offset / per_page) + 1
|
88
93
|
order_column = params[:iSortCol_0].to_i
|
89
|
-
order = "#{columns[order_column]} #{params[:
|
94
|
+
order = "#{columns[order_column]} #{params[:sSortDir_0].upcase}"
|
90
95
|
|
91
96
|
conditions = {}
|
92
97
|
includes = []
|
@@ -48,7 +48,12 @@ class Admin::UsersController < Admin::BaseController
|
|
48
48
|
else
|
49
49
|
flash[:error] = I18n.t('user.destroy.failed').capitalize
|
50
50
|
end
|
51
|
-
|
51
|
+
respond_to do |wants|
|
52
|
+
wants.html do
|
53
|
+
redirect_to([forgeos_core, :admin, :users])
|
54
|
+
end
|
55
|
+
wants.js
|
56
|
+
end
|
52
57
|
end
|
53
58
|
|
54
59
|
def activate
|
@@ -65,10 +70,11 @@ class Admin::UsersController < Admin::BaseController
|
|
65
70
|
flash[:error] = I18n.t('user.disactivation.failed').capitalize
|
66
71
|
end
|
67
72
|
end
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
73
|
+
respond_to do |wants|
|
74
|
+
wants.html do
|
75
|
+
redirect_to(:back)
|
76
|
+
end
|
77
|
+
wants.js
|
72
78
|
end
|
73
79
|
end
|
74
80
|
|
@@ -173,7 +179,7 @@ private
|
|
173
179
|
per_page = params[:iDisplayLength] ? params[:iDisplayLength].to_i : 10
|
174
180
|
offset = params[:iDisplayStart] ? params[:iDisplayStart].to_i : 0
|
175
181
|
page = (offset / per_page) + 1
|
176
|
-
order = "#{columns[params[:iSortCol_0].to_i]} #{params[:
|
182
|
+
order = "#{columns[params[:iSortCol_0].to_i]} #{params[:sSortDir_0] ? params[:sSortDir_0].upcase : 'ASC'}"
|
177
183
|
|
178
184
|
conditions = {}
|
179
185
|
includes = []
|
@@ -7,8 +7,7 @@ class Forgeos::ApplicationController < ActionController::Base
|
|
7
7
|
def notifications
|
8
8
|
@notifications = {}
|
9
9
|
[:error, :notice, :warning].each do |key|
|
10
|
-
|
11
|
-
@notifications[key] = message unless message.blank?
|
10
|
+
@notifications[key] = flash[key] unless flash[key].blank?
|
12
11
|
end
|
13
12
|
render :json => @notifications.to_json
|
14
13
|
end
|