kuppayam 0.1.38 → 0.1.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/kuppayam.css +2 -2
- data/app/helpers/image_helper.rb +1 -1
- data/app/helpers/resource_helper.rb +10 -10
- data/app/views/kuppayam/workflows/default/create.js.erb +8 -9
- data/app/views/kuppayam/workflows/default/destroy.js.erb +9 -9
- data/app/views/kuppayam/workflows/default/edit.js.erb +1 -1
- data/app/views/kuppayam/workflows/default/index.js.erb +7 -21
- data/app/views/kuppayam/workflows/default/new.js.erb +1 -1
- data/app/views/kuppayam/workflows/default/row.js.erb +6 -7
- data/app/views/kuppayam/workflows/default/update.js.erb +5 -5
- data/app/views/kuppayam/workflows/nested_folders/create.js.erb +80 -0
- data/app/views/kuppayam/workflows/nested_folders/destroy.js.erb +28 -0
- data/app/views/kuppayam/workflows/nested_folders/edit.js.erb +21 -0
- data/app/views/kuppayam/workflows/nested_folders/index.js.erb +31 -0
- data/app/views/kuppayam/workflows/nested_folders/new.js.erb +21 -0
- data/app/views/kuppayam/workflows/nested_folders/row.js.erb +45 -0
- data/app/views/kuppayam/workflows/nested_folders/show.js.erb +17 -0
- data/app/views/kuppayam/workflows/nested_folders/update.js.erb +69 -0
- data/app/views/layouts/kuppayam/_horizontal_menu.html.erb +3 -3
- data/app/views/layouts/kuppayam/_navbar.html.erb +1 -1
- data/app/views/layouts/kuppayam/_sidebar.html.erb +2 -2
- data/lib/kuppayam/version.rb +1 -1
- metadata +50 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8b2aa33889bf80bc7dcf9dad60b4f6cb1bcae5498648ddfe84f6b79aadd0259
|
4
|
+
data.tar.gz: 7d4a617d33fa698f79734bc3527fa52c72e90cb4dd7e063b58a4c9a1f9842269
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a8ee4c17c4f3cd6851aa56e1e12de70f9f86febf6b75b29267244bacef9692634fdd5d16a1f64dc23d815d162a23196d392107ed729f6e3e007c04c249e02f8
|
7
|
+
data.tar.gz: 2811563f05f8a3804f35f98fb303fd87820219cec64e4a514a9589f5d2115aa13798a58a3da3262feab45668a0b539408bf18b36fba7a549e556c0b940de0908
|
@@ -10,8 +10,8 @@
|
|
10
10
|
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
11
|
* It is generally better to create a new file per style scope.
|
12
12
|
*
|
13
|
-
*= require
|
14
|
-
*= require
|
13
|
+
*= require font-awesome
|
14
|
+
*= require simple-line-icons
|
15
15
|
*= require bootstrap.css
|
16
16
|
*= require xenon-core.css
|
17
17
|
*= require xenon-forms.css
|
data/app/helpers/image_helper.rb
CHANGED
@@ -54,7 +54,7 @@ module ImageHelper
|
|
54
54
|
raise if url.blank?
|
55
55
|
rescue
|
56
56
|
options.reverse_merge!(size: "small")
|
57
|
-
url = object.respond_to?(:default_image_url) ? object.default_image_url(options[:size]) : "
|
57
|
+
url = object.respond_to?(:default_image_url) ? object.default_image_url(options[:size]) : "kuppayam/defaults/default-#{options[:size]}.png"
|
58
58
|
end
|
59
59
|
return url
|
60
60
|
end
|
@@ -204,6 +204,15 @@ module ResourceHelper
|
|
204
204
|
# table uses html tables and feed uses div based boxes
|
205
205
|
layout: :table,
|
206
206
|
|
207
|
+
# Mention all checkbox fields so that it will resource controller will set that value to be false when the update action is called
|
208
|
+
# if @resource_options[:checkbox_fields] && @resource_options[:checkbox_fields].any?
|
209
|
+
# @resource_options[:checkbox_fields].each do |field|
|
210
|
+
# @r_object.write_attribute(field, false)
|
211
|
+
# end
|
212
|
+
# end
|
213
|
+
# This is a tricky solution to update bolean fields which are shown as checkbox.
|
214
|
+
checkbox_fields: [],
|
215
|
+
|
207
216
|
# "/kuppayam/workflows/default"
|
208
217
|
#
|
209
218
|
# Default partial opens show and form partial according to the model_size configuration
|
@@ -216,21 +225,12 @@ module ResourceHelper
|
|
216
225
|
# Peacock opens show and form partials in large popup where as Parrot opens it in small
|
217
226
|
# Both Peacock and Parrot expect table based layout and will reload a single row after create / update
|
218
227
|
|
219
|
-
# Mention all checkbox fields so that it will resource controller will set that value to be false when the update action is called
|
220
|
-
# if @resource_options[:checkbox_fields] && @resource_options[:checkbox_fields].any?
|
221
|
-
# @resource_options[:checkbox_fields].each do |field|
|
222
|
-
# @r_object.write_attribute(field, false)
|
223
|
-
# end
|
224
|
-
# end
|
225
|
-
# This is a tricky solution to update bolean fields which are shown as checkbox.
|
226
|
-
checkbox_fields: [],
|
227
|
-
|
228
228
|
# Rendering Paths
|
229
229
|
view_path: "/path/to/partials",
|
230
230
|
js_view_path: "/kuppayam/workflows/default",
|
231
231
|
|
232
232
|
# Additional Configurations
|
233
|
-
|
233
|
+
load_rich_text_editor: false,
|
234
234
|
tagsinput: false
|
235
235
|
}
|
236
236
|
end
|
@@ -1,15 +1,14 @@
|
|
1
1
|
<%
|
2
2
|
if @resource_options[:layout] == :table
|
3
|
-
|
4
|
-
|
3
|
+
item_id = "#tr_#{@resource_options[:item_name]}_#{@r_object.try(:id)}"
|
4
|
+
parent_id = raw("#div_#{@resource_options[:item_name]}_index table > tbody")
|
5
5
|
elsif @resource_options[:layout] == :feed
|
6
|
-
|
7
|
-
|
6
|
+
item_id = "#div_#{@resource_options[:item_name]}_#{@r_object.try(:id)}"
|
7
|
+
parent_id = "#div_#{@resource_options[:item_name]}_list"
|
8
8
|
end
|
9
|
+
show_id = "#div_#{@resource_options[:item_name]}_show"
|
9
10
|
%>
|
10
11
|
|
11
|
-
<% show_id = "#div_#{@resource_options[:item_name]}_show" %>
|
12
|
-
|
13
12
|
<% if @r_object.errors.blank? %>
|
14
13
|
|
15
14
|
<%
|
@@ -20,8 +19,8 @@
|
|
20
19
|
%>
|
21
20
|
|
22
21
|
// Inserting the row on top of the table and highlighting it
|
23
|
-
$("<%=
|
24
|
-
$("<%=
|
22
|
+
$("<%= parent_id %>").prepend("<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/row", locals: locals)) %>");
|
23
|
+
$("<%= item_id %>").css("background-color", "#fffddd");
|
25
24
|
|
26
25
|
<% if @resource_options[:show_modal_after_create] %>
|
27
26
|
|
@@ -61,7 +60,7 @@
|
|
61
60
|
<% error_message = content_tag(:div, I18n.t('errors.errors_highlighted'), class: "alert alert-danger mt-20") %>
|
62
61
|
$("#<%= @resource_options[:item_name] %>_form_error").html("<%= escape_javascript(error_message) %>");
|
63
62
|
|
64
|
-
<% if @resource_options[:
|
63
|
+
<% if @resource_options[:load_rich_text_editor] %>
|
65
64
|
// Initialize WYSIHTML Editor
|
66
65
|
$(".wysihtml5").wysihtml5(
|
67
66
|
{"stylesheets": '/assets/wysiwyg-color.css'}
|
@@ -1,13 +1,15 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<%
|
2
|
+
if @resource_options[:layout] == :table
|
3
|
+
item_id = "#tr_#{@resource_options[:item_name]}_#{@r_object.id}"
|
4
|
+
elsif @resource_options[:layout] == :feed
|
5
|
+
item_id = "#div_#{@resource_options[:item_name]}_#{@r_object.id}"
|
6
|
+
end
|
7
|
+
%>
|
6
8
|
|
7
9
|
<% if @destroyed %>
|
8
10
|
|
9
11
|
// Removing the item from the list
|
10
|
-
$("<%=
|
12
|
+
$("<%= item_id %>").remove();
|
11
13
|
|
12
14
|
// Closing the modal if it is opened
|
13
15
|
<% if @resource_options[:show_model_size] == :generic %>
|
@@ -27,6 +29,4 @@
|
|
27
29
|
// Showing Growl Like Message
|
28
30
|
notifyError("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(@notification[:message]) %>");
|
29
31
|
|
30
|
-
<% end %>
|
31
|
-
|
32
|
-
|
32
|
+
<% end %>
|
@@ -8,7 +8,7 @@ var bodyContent = "<%= escape_javascript(render(:partial=>"#{@resource_options[:
|
|
8
8
|
<% end %>
|
9
9
|
|
10
10
|
// Initialize WYSIHTML Editor
|
11
|
-
<% if @resource_options[:
|
11
|
+
<% if @resource_options[:load_rich_text_editor] %>
|
12
12
|
$(".wysihtml5").wysihtml5(
|
13
13
|
{"stylesheets": '/assets/wysiwyg-color.css'}
|
14
14
|
);
|
@@ -1,10 +1,9 @@
|
|
1
1
|
<%
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
index_id = "#div_#{@resource_options[:item_name]}_index"
|
2
|
+
if @resource_options[:layout] == :table
|
3
|
+
list_id = "#div_#{@resource_options[:item_name]}_index"
|
4
|
+
elsif @resource_options[:layout] == :feed
|
5
|
+
list_id = "#div_#{@resource_options[:item_name]}_list"
|
6
|
+
end
|
8
7
|
%>
|
9
8
|
|
10
9
|
// Close Modal if it is opened
|
@@ -15,7 +14,6 @@
|
|
15
14
|
<% end %>
|
16
15
|
|
17
16
|
<% if @r_objects.any? %>
|
18
|
-
|
19
17
|
<%
|
20
18
|
if @row_partial_locals && @row_partial_locals.is_a?(Hash) && !@row_partial_locals.empty?
|
21
19
|
locals = @row_partial_locals
|
@@ -23,21 +21,9 @@
|
|
23
21
|
locals = {}
|
24
22
|
end
|
25
23
|
%>
|
26
|
-
|
27
24
|
// Refresh the list
|
28
|
-
$("<%=
|
29
|
-
|
25
|
+
$("<%= list_id %>").html("<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/index", locals: locals)) %>");
|
30
26
|
<% else %>
|
31
|
-
|
32
|
-
<%
|
33
|
-
if @resource_options[:layout] == :table
|
34
|
-
list_id = "#div_#{@resource_options[:item_name]}_index"
|
35
|
-
elsif @resource_options[:layout] == :feed
|
36
|
-
list_id = "#div_#{@resource_options[:item_name]}_list"
|
37
|
-
end
|
38
|
-
%>
|
39
|
-
|
40
|
-
var noResultsText = "<%= escape_javascript(theme_panel_message(I18n.translate('success.no_results_found')))%>";
|
27
|
+
var noResultsText = "<%= escape_javascript(theme_panel_message(I18n.translate('success.no_results_found')))%>";
|
41
28
|
$("<%= list_id %>").html(noResultsText);
|
42
|
-
|
43
29
|
<% end %>
|
@@ -9,7 +9,7 @@ var bodyContent = "<%= escape_javascript(render(:partial=>"#{@resource_options[:
|
|
9
9
|
<% end %>
|
10
10
|
|
11
11
|
// Initialize WYSIHTML Editor
|
12
|
-
<% if @resource_options[:
|
12
|
+
<% if @resource_options[:load_rich_text_editor] %>
|
13
13
|
$(".wysihtml5").wysihtml5(
|
14
14
|
{"stylesheets": '/assets/wysiwyg-color.css'}
|
15
15
|
);
|
@@ -1,13 +1,12 @@
|
|
1
1
|
<%
|
2
2
|
if @resource_options[:layout] == :table
|
3
|
-
|
3
|
+
item_id = "#tr_#{@resource_options[:item_name]}_#{@r_object.id}"
|
4
4
|
elsif @resource_options[:layout] == :feed
|
5
|
-
|
5
|
+
item_id = "#div_#{@resource_options[:item_name]}_#{@r_object.id}"
|
6
6
|
end
|
7
|
+
show_id = "#div_#{@resource_options[:item_name]}_show"
|
7
8
|
%>
|
8
9
|
|
9
|
-
<% show_id = "#div_#{@resource_options[:item_name]}_show" %>
|
10
|
-
|
11
10
|
<% if @r_object && @r_object.errors.blank? %>
|
12
11
|
|
13
12
|
<%
|
@@ -18,8 +17,8 @@
|
|
18
17
|
%>
|
19
18
|
|
20
19
|
// Updating the edited row and highlighting it
|
21
|
-
$("<%=
|
22
|
-
$("<%=
|
20
|
+
$("<%= item_id %>").replaceWith("<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/row", locals: locals)) %>");
|
21
|
+
$("<%= item_id %>").css("background-color", "#fffddd");
|
23
22
|
|
24
23
|
<% if @resource_options[:show_modal_after_update] %>
|
25
24
|
// Refresh the modal content if it is open
|
@@ -42,7 +41,7 @@
|
|
42
41
|
<% else %>
|
43
42
|
|
44
43
|
// Updating the row which got errored and highlighting it
|
45
|
-
$("<%=
|
44
|
+
$("<%= item_id %>").css("background-color", "#ffefef");
|
46
45
|
|
47
46
|
// Showing Growl Like Message
|
48
47
|
notifyError("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(raw(@notification[:message])) %>");
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%
|
2
2
|
if @resource_options[:layout] == :table
|
3
|
-
|
3
|
+
item_id = "#tr_#{@resource_options[:item_name]}_#{@r_object.id}"
|
4
4
|
elsif @resource_options[:layout] == :feed
|
5
|
-
|
5
|
+
item_id = "#div_#{@resource_options[:item_name]}_#{@r_object.id}"
|
6
6
|
end
|
7
7
|
%>
|
8
8
|
|
@@ -16,8 +16,8 @@
|
|
16
16
|
%>
|
17
17
|
|
18
18
|
// Updating the edited row and highlighting it
|
19
|
-
$("<%=
|
20
|
-
$("<%=
|
19
|
+
$("<%= item_id %>").replaceWith("<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/row", locals: locals)) %>");
|
20
|
+
$("<%= item_id %>").css("background-color", "#fffddd");
|
21
21
|
|
22
22
|
// Showing the saved data in the modal
|
23
23
|
<% if @resource_options[:show_modal_after_update] %>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
$("#<%= @resource_options[:item_name] %>_form_error").html("<%= escape_javascript(error_message) %>");
|
57
57
|
|
58
58
|
// Initialize WYSIHTML Editor
|
59
|
-
<% if @resource_options[:
|
59
|
+
<% if @resource_options[:load_rich_text_editor] %>
|
60
60
|
$(".wysihtml5").wysihtml5(
|
61
61
|
{"stylesheets": '/assets/wysiwyg-color.css'}
|
62
62
|
);
|
@@ -0,0 +1,80 @@
|
|
1
|
+
<%
|
2
|
+
header_id = "#div_#{@resource_options[:item_name]}_header"
|
3
|
+
list_id = "#div_#{@resource_options[:item_name]}_list"
|
4
|
+
item_id = "#div_#{@resource_options[:item_name]}_#{@r_object.try(:id)}"
|
5
|
+
%>
|
6
|
+
|
7
|
+
<% if @r_object.errors.blank? %>
|
8
|
+
|
9
|
+
<%
|
10
|
+
locals = {@resource_options[:item_name].to_sym => @r_object, i: -1}
|
11
|
+
if @row_partial_locals && @row_partial_locals.is_a?(Hash) && !@row_partial_locals.empty?
|
12
|
+
locals.merge!(@row_partial_locals)
|
13
|
+
end
|
14
|
+
%>
|
15
|
+
|
16
|
+
// Refresh the list
|
17
|
+
$("<%= list_id %>").html("<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/index", locals: locals)) %>");
|
18
|
+
|
19
|
+
// Refresh the Header
|
20
|
+
$("<%= header_id %>").html("<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/header", locals: locals)) %>");
|
21
|
+
|
22
|
+
// Highlighting the newly added item
|
23
|
+
$("<%= item_id %>").css("background-color", "#fffddd");
|
24
|
+
|
25
|
+
<% if @resource_options[:show_modal_after_create] %>
|
26
|
+
|
27
|
+
// Showing the saved data in the modal
|
28
|
+
var heading = "<%= raw @r_object.try(:display_name) %>";
|
29
|
+
var bodyContent = "<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/show")) %>";
|
30
|
+
<% if @resource_options[:show_model_size] == :generic %>
|
31
|
+
showGenericModal(heading, bodyContent, true);
|
32
|
+
<% elsif @resource_options[:show_model_size] == :large %>
|
33
|
+
showLargeModal(heading, bodyContent, true);
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
<% else %>
|
37
|
+
// Closing the modal if it is opened
|
38
|
+
<% if @resource_options[:form_model_size] == :generic %>
|
39
|
+
closeGenericModal();
|
40
|
+
<% elsif @resource_options[:form_model_size] == :large %>
|
41
|
+
closeLargeModal();
|
42
|
+
<% end %>
|
43
|
+
<% end %>
|
44
|
+
|
45
|
+
// Showing Growl Like Message
|
46
|
+
notifySuccess("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(@notification[:message]) %>");
|
47
|
+
|
48
|
+
<% else %>
|
49
|
+
|
50
|
+
// Reload the form with errors
|
51
|
+
var heading = "Add an <%= @resource_options[:collection_name] %>";
|
52
|
+
var bodyContent = "<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/form")) %>";
|
53
|
+
<% if @resource_options[:form_model_size] == :generic %>
|
54
|
+
showGenericModal(heading, bodyContent, true);
|
55
|
+
<% elsif @resource_options[:form_model_size] == :large %>
|
56
|
+
showLargeModal(heading, bodyContent, true);
|
57
|
+
<% end %>
|
58
|
+
|
59
|
+
// Show Main Error Message on the form
|
60
|
+
<% error_message = content_tag(:div, I18n.t('errors.errors_highlighted'), class: "alert alert-danger mt-20") %>
|
61
|
+
$("#<%= @resource_options[:item_name] %>_form_error").html("<%= escape_javascript(error_message) %>");
|
62
|
+
|
63
|
+
<% if @resource_options[:load_rich_text_editor] %>
|
64
|
+
// Initialize WYSIHTML Editor
|
65
|
+
$(".wysihtml5").wysihtml5(
|
66
|
+
{"stylesheets": '/assets/wysiwyg-color.css'}
|
67
|
+
);
|
68
|
+
<% end %>
|
69
|
+
|
70
|
+
<% if @resource_options[:tagsinput] %>
|
71
|
+
// Initialize WYSIHTML Editor
|
72
|
+
$('input.kuppayam-tagsinput').tagsinput();
|
73
|
+
<% end %>
|
74
|
+
|
75
|
+
// Showing Growl Like Message
|
76
|
+
notifyError("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(raw(@notification[:message])) %>");
|
77
|
+
|
78
|
+
<% end %>
|
79
|
+
|
80
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<%
|
2
|
+
item_id = "#div_#{@resource_options[:item_name]}_#{@r_object.id}"
|
3
|
+
%>
|
4
|
+
|
5
|
+
<% if @destroyed %>
|
6
|
+
|
7
|
+
// Removing the item from the list
|
8
|
+
$("<%= item_id %>").remove();
|
9
|
+
|
10
|
+
// Closing the modal if it is opened
|
11
|
+
<% if @resource_options[:show_model_size] == :generic %>
|
12
|
+
closeGenericModal();
|
13
|
+
<% elsif @resource_options[:show_model_size] == :large %>
|
14
|
+
closeLargeModal();
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
// Showing Growl Like Message
|
18
|
+
notifySuccess("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(@notification[:message]) %>");
|
19
|
+
|
20
|
+
<% else %>
|
21
|
+
|
22
|
+
// Show the error in a modal
|
23
|
+
showMessageModal("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(@notification[:message]) %>");
|
24
|
+
|
25
|
+
// Showing Growl Like Message
|
26
|
+
notifyError("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(@notification[:message]) %>");
|
27
|
+
|
28
|
+
<% end %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// Load the form
|
2
|
+
var heading = "Edit '<%= raw @r_object.try(:display_name) %>'";
|
3
|
+
var bodyContent = "<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/form")) %>";
|
4
|
+
<% if @resource_options[:form_model_size] == :generic %>
|
5
|
+
showGenericModal(heading, bodyContent, true);
|
6
|
+
<% elsif @resource_options[:form_model_size] == :large %>
|
7
|
+
showLargeModal(heading, bodyContent, true);
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
// Initialize WYSIHTML Editor
|
11
|
+
<% if @resource_options[:load_rich_text_editor] %>
|
12
|
+
$(".wysihtml5").wysihtml5(
|
13
|
+
{"stylesheets": '/assets/wysiwyg-color.css'}
|
14
|
+
);
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
// Initialize WYSIHTML Editor
|
18
|
+
<% if @resource_options[:tagsinput] %>
|
19
|
+
$('input.kuppayam-tagsinput').tagsinput();
|
20
|
+
<% end %>
|
21
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<%
|
2
|
+
header_id = "#div_#{@resource_options[:item_name]}_header"
|
3
|
+
list_id = "#div_#{@resource_options[:item_name]}_list"
|
4
|
+
%>
|
5
|
+
|
6
|
+
// Close Modal if it is opened
|
7
|
+
<% if @resource_options[:show_model_size] == "generic" %>
|
8
|
+
closeGenericModal();
|
9
|
+
<% elsif @resource_options[:show_model_size] == "large" %>
|
10
|
+
closeLargeModal();
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<% if @r_objects.any? %>
|
14
|
+
<%
|
15
|
+
if @row_partial_locals && @row_partial_locals.is_a?(Hash) && !@row_partial_locals.empty?
|
16
|
+
locals = @row_partial_locals
|
17
|
+
else
|
18
|
+
locals = {}
|
19
|
+
end
|
20
|
+
%>
|
21
|
+
|
22
|
+
// Refresh the list
|
23
|
+
$("<%= list_id %>").html("<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/index", locals: locals)) %>");
|
24
|
+
|
25
|
+
// Refresh the Header
|
26
|
+
$("<%= header_id %>").html("<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/header", locals: locals)) %>");
|
27
|
+
|
28
|
+
<% else %>
|
29
|
+
var noResultsText = "<%= escape_javascript(theme_panel_message(I18n.translate('success.no_results_found')))%>";
|
30
|
+
$("<%= list_id %>").html(noResultsText);
|
31
|
+
<% end %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// Load the form
|
2
|
+
var heading = "Add <%= @resource_options[:item_name].to_s.titleize %>";
|
3
|
+
var bodyContent = "<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/form")) %>";
|
4
|
+
|
5
|
+
<% if @resource_options[:form_model_size] == :generic %>
|
6
|
+
showGenericModal(heading, bodyContent, true);
|
7
|
+
<% elsif @resource_options[:form_model_size] == :large %>
|
8
|
+
showLargeModal(heading, bodyContent, true);
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
// Initialize WYSIHTML Editor
|
12
|
+
<% if @resource_options[:load_rich_text_editor] %>
|
13
|
+
$(".wysihtml5").wysihtml5(
|
14
|
+
{"stylesheets": '/assets/wysiwyg-color.css'}
|
15
|
+
);
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
// Initialize WYSIHTML Editor
|
19
|
+
<% if @resource_options[:tagsinput] %>
|
20
|
+
$('input.kuppayam-tagsinput').tagsinput();
|
21
|
+
<% end %>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<%
|
2
|
+
item_id = "#div_#{@resource_options[:item_name]}_#{@r_object.id}"
|
3
|
+
show_id = "#div_#{@resource_options[:item_name]}_show"
|
4
|
+
%>
|
5
|
+
|
6
|
+
<% if @r_object && @r_object.errors.blank? %>
|
7
|
+
|
8
|
+
<%
|
9
|
+
locals = {@resource_options[:item_name].to_sym => @r_object, i: -1}
|
10
|
+
if @row_partial_locals && @row_partial_locals.is_a?(Hash) && !@row_partial_locals.empty?
|
11
|
+
locals.merge!(@row_partial_locals)
|
12
|
+
end
|
13
|
+
%>
|
14
|
+
|
15
|
+
// Updating the edited row and highlighting it
|
16
|
+
$("<%= item_id %>").replaceWith("<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/row", locals: locals)) %>");
|
17
|
+
$("<%= item_id %>").css("background-color", "#fffddd");
|
18
|
+
|
19
|
+
<% if @resource_options[:show_modal_after_update] %>
|
20
|
+
// Refresh the modal content if it is open
|
21
|
+
$("<%= show_id %>").replaceWith("<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/show")) %>")
|
22
|
+
<% else %>
|
23
|
+
// Closing the modal if it is opened
|
24
|
+
<% if @resource_options[:form_model_size] == :generic %>
|
25
|
+
closeGenericModal();
|
26
|
+
<% elsif @resource_options[:form_model_size] == :large %>
|
27
|
+
closeLargeModal();
|
28
|
+
<% end %>
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
// Closing the modal
|
32
|
+
showAndHideModals();
|
33
|
+
|
34
|
+
// Showing Growl Like Message
|
35
|
+
notifySuccess("<%= @notification[:title] %>", "<%= @notification[:message] %>");
|
36
|
+
|
37
|
+
<% else %>
|
38
|
+
|
39
|
+
// Updating the row which got errored and highlighting it
|
40
|
+
$("<%= item_id %>").css("background-color", "#ffefef");
|
41
|
+
|
42
|
+
// Showing Growl Like Message
|
43
|
+
notifyError("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(raw(@notification[:message])) %>");
|
44
|
+
|
45
|
+
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% if @r_object %>
|
2
|
+
|
3
|
+
// Show the details in the large modal
|
4
|
+
var heading = "<%= raw @r_object.try(:display_name) %>";
|
5
|
+
var bodyContent = "<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/show")) %>";
|
6
|
+
<% if @resource_options[:show_model_size] == :generic %>
|
7
|
+
showGenericModal(heading, bodyContent, true);
|
8
|
+
<% elsif @resource_options[:show_model_size] == :large %>
|
9
|
+
showLargeModal(heading, bodyContent, true);
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<% else %>
|
13
|
+
|
14
|
+
// Showing Growl Like Message
|
15
|
+
notifyError("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(raw(@notification[:message])) %>");
|
16
|
+
|
17
|
+
<% end %>
|
@@ -0,0 +1,69 @@
|
|
1
|
+
<%
|
2
|
+
item_id = "#div_#{@resource_options[:item_name]}_#{@r_object.try(:id)}"
|
3
|
+
%>
|
4
|
+
|
5
|
+
<% if @r_object.errors.blank? %>
|
6
|
+
|
7
|
+
<%
|
8
|
+
locals = {@resource_options[:item_name].to_sym => @r_object, i: -1}
|
9
|
+
if @row_partial_locals && @row_partial_locals.is_a?(Hash) && !@row_partial_locals.empty?
|
10
|
+
locals.merge!(@row_partial_locals)
|
11
|
+
end
|
12
|
+
%>
|
13
|
+
|
14
|
+
// Updating the edited row and highlighting it
|
15
|
+
$("<%= item_id %>").replaceWith("<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/row", locals: locals)) %>");
|
16
|
+
$("<%= item_id %>").css("background-color", "#fffddd");
|
17
|
+
|
18
|
+
// Showing the saved data in the modal
|
19
|
+
<% if @resource_options[:show_modal_after_update] %>
|
20
|
+
var heading = "<%= raw @r_object.try(:display_name) %>";
|
21
|
+
var bodyContent = "<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/show")) %>";
|
22
|
+
<% if @resource_options[:show_model_size] == :generic %>
|
23
|
+
showGenericModal(heading, bodyContent, true);
|
24
|
+
<% elsif @resource_options[:show_model_size] == :large %>
|
25
|
+
showLargeModal(heading, bodyContent, true);
|
26
|
+
<% end %>
|
27
|
+
<% else %>
|
28
|
+
// Closing the modal if it is opened
|
29
|
+
<% if @resource_options[:form_model_size] == :generic %>
|
30
|
+
closeGenericModal();
|
31
|
+
<% elsif @resource_options[:form_model_size] == :large %>
|
32
|
+
closeLargeModal();
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
// Showing Growl Like Message
|
37
|
+
notifySuccess("<%= @notification[:title] %>", "<%= @notification[:message] %>");
|
38
|
+
|
39
|
+
<% else %>
|
40
|
+
|
41
|
+
// Reload the form with errors
|
42
|
+
var heading = "Edit '<%= raw @r_object.try(:display_name) %>'";
|
43
|
+
var bodyContent = "<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/form")) %>";
|
44
|
+
<% if @resource_options[:form_model_size] == :generic %>
|
45
|
+
showGenericModal(heading, bodyContent, true);
|
46
|
+
<% elsif @resource_options[:form_model_size] == :large %>
|
47
|
+
showLargeModal(heading, bodyContent, true);
|
48
|
+
<% end %>
|
49
|
+
|
50
|
+
// Show Main Error Message on the form
|
51
|
+
<% error_message = content_tag(:div, I18n.t('errors.errors_highlighted'), class: "alert alert-danger mt-20") %>
|
52
|
+
$("#<%= @resource_options[:item_name] %>_form_error").html("<%= escape_javascript(error_message) %>");
|
53
|
+
|
54
|
+
// Initialize WYSIHTML Editor
|
55
|
+
<% if @resource_options[:load_rich_text_editor] %>
|
56
|
+
$(".wysihtml5").wysihtml5(
|
57
|
+
{"stylesheets": '/assets/wysiwyg-color.css'}
|
58
|
+
);
|
59
|
+
<% end %>
|
60
|
+
|
61
|
+
// Initialize WYSIHTML Editor
|
62
|
+
<% if @resource_options[:tagsinput] %>
|
63
|
+
$('input.kuppayam-tagsinput').tagsinput();
|
64
|
+
<% end %>
|
65
|
+
|
66
|
+
// Showing Growl Like Message
|
67
|
+
notifyError("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(raw(@notification[:message])) %>");
|
68
|
+
|
69
|
+
<% end %>
|
@@ -5,8 +5,8 @@
|
|
5
5
|
<!-- Navbar Brand -->
|
6
6
|
<div class="navbar-brand">
|
7
7
|
<a href="dashboard-1.html" class="logo">
|
8
|
-
|
9
|
-
|
8
|
+
<%= image_tag("logo.png", class: "hidden-xs") %>
|
9
|
+
<%= image_tag("logo-small.png", class: "visible-xs") %>
|
10
10
|
</a>
|
11
11
|
<a href="#" data-toggle="settings-pane" data-animate="true">
|
12
12
|
<i class="linecons-cog"></i>
|
@@ -878,7 +878,7 @@
|
|
878
878
|
|
879
879
|
<li class="dropdown user-profile">
|
880
880
|
<a href="#" data-toggle="dropdown">
|
881
|
-
|
881
|
+
<%= image_tag "kuppayam/defaults/user-large.png", class: "img-circle img-inline userpic-32", width: "28" %>
|
882
882
|
<span>
|
883
883
|
Arlind Nushi
|
884
884
|
<i class="fa-angle-down"></i>
|
@@ -269,7 +269,7 @@
|
|
269
269
|
|
270
270
|
<li class="dropdown user-profile">
|
271
271
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
272
|
-
|
272
|
+
<%= image_tag "kuppayam/defaults/user-large.png", class: "img-circle img-inline userpic-32", width: "28" %>
|
273
273
|
<span>
|
274
274
|
John Smith
|
275
275
|
<i class="fa-angle-down"></i>
|
@@ -7,11 +7,11 @@
|
|
7
7
|
<!-- logo -->
|
8
8
|
<div class="logo">
|
9
9
|
<a href="/" class="logo-expanded">
|
10
|
-
|
10
|
+
<%= image_tag("logo-white.png", width: "180") %>
|
11
11
|
</a>
|
12
12
|
|
13
13
|
<a href="/" class="logo-collapsed">
|
14
|
-
|
14
|
+
<%= image_tag("logo-small.png", width: "40") %>
|
15
15
|
</a>
|
16
16
|
</div>
|
17
17
|
|
data/lib/kuppayam/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kuppayam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.39
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kpvarma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -50,6 +50,46 @@ dependencies:
|
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 4.3.0
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: font-awesome-rails
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: 4.7.0.3
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 4.7.0
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 4.7.0.3
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 4.7.0
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: simple-line-icons-rails
|
75
|
+
requirement: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - "~>"
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 0.1.3
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.1.0
|
83
|
+
type: :runtime
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.1.3
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 0.1.0
|
53
93
|
- !ruby/object:Gem::Dependency
|
54
94
|
name: kaminari
|
55
95
|
requirement: !ruby/object:Gem::Requirement
|
@@ -505,6 +545,14 @@ files:
|
|
505
545
|
- app/views/kuppayam/workflows/default/row.js.erb
|
506
546
|
- app/views/kuppayam/workflows/default/show.js.erb
|
507
547
|
- app/views/kuppayam/workflows/default/update.js.erb
|
548
|
+
- app/views/kuppayam/workflows/nested_folders/create.js.erb
|
549
|
+
- app/views/kuppayam/workflows/nested_folders/destroy.js.erb
|
550
|
+
- app/views/kuppayam/workflows/nested_folders/edit.js.erb
|
551
|
+
- app/views/kuppayam/workflows/nested_folders/index.js.erb
|
552
|
+
- app/views/kuppayam/workflows/nested_folders/new.js.erb
|
553
|
+
- app/views/kuppayam/workflows/nested_folders/row.js.erb
|
554
|
+
- app/views/kuppayam/workflows/nested_folders/show.js.erb
|
555
|
+
- app/views/kuppayam/workflows/nested_folders/update.js.erb
|
508
556
|
- app/views/kuppayam/workflows/parrot/_info.html.erb
|
509
557
|
- app/views/kuppayam/workflows/parrot/create.js.erb
|
510
558
|
- app/views/kuppayam/workflows/parrot/destroy.js.erb
|