knitkit 3.0.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{public → app/assets}/images/check.png +0 -0
- data/{public → app/assets}/images/credit_card.png +0 -0
- data/{public → app/assets}/images/inline_edit/close.png +0 -0
- data/{public → app/assets}/images/knitkit/icons/document.png +0 -0
- data/{public → app/assets}/images/knitkit/icons/multi_doc.png +0 -0
- data/{public → app/assets}/images/knitkit/logo.png +0 -0
- data/{public → app/assets}/images/knitkit/splash/images/add-site.png +0 -0
- data/app/assets/images/knitkit/splash/images/add_website_105x105-active.png +0 -0
- data/app/assets/images/knitkit/splash/images/add_website_105x105.png +0 -0
- data/{public → app/assets}/images/knitkit/splash/images/adjust-site.png +0 -0
- data/{public → app/assets}/images/knitkit/splash/images/browse-site.png +0 -0
- data/app/assets/images/knitkit/splash/images/browse_db_105x105-active.png +0 -0
- data/app/assets/images/knitkit/splash/images/browse_db_105x105.png +0 -0
- data/app/assets/images/knitkit/splash/images/console_105x105-active.png +0 -0
- data/app/assets/images/knitkit/splash/images/console_105x105.png +0 -0
- data/{public → app/assets}/images/knitkit/splash/images/find-themes.png +0 -0
- data/app/assets/images/knitkit/splash/images/find_themes_105x105-active.png +0 -0
- data/app/assets/images/knitkit/splash/images/find_themes_105x105.png +0 -0
- data/app/assets/images/knitkit/splash/images/learn_more_105x105-active.png +0 -0
- data/app/assets/images/knitkit/splash/images/learn_more_105x105.png +0 -0
- data/{public → app/assets}/images/knitkit/splash/images/settings.png +0 -0
- data/{public → app/assets}/images/knitkit/splash/images/tutorials.png +0 -0
- data/app/assets/images/knitkit/splash/splash.png +0 -0
- data/app/assets/images/widgets/manage_profile/contact_information.png +0 -0
- data/app/assets/images/widgets/manage_profile/password.png +0 -0
- data/app/assets/images/widgets/manage_profile/user_information.png +0 -0
- data/app/assets/javascripts/erp_app/desktop/applications/knitkit/app.js +24 -0
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/articles_grid_panel.js +15 -12
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/center_region.js +69 -48
- data/app/assets/javascripts/erp_app/desktop/applications/knitkit/comments_grid_panel.js +214 -0
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/east_region.js +0 -0
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/file_assets_panel.js +17 -19
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/image_assets_data_view.js +13 -3
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/image_assets_panel.js +59 -48
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/widgets_panel.js +0 -0
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/inquiries_grid_panel.js +2 -2
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/module.js +2 -2
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/publish_window.js +0 -0
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/published_grid_panel.js +1 -1
- data/app/assets/javascripts/erp_app/desktop/applications/knitkit/splash_screen.js +268 -0
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/top_menu/main_menu.js +85 -33
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/top_menu/websites_combo.js +0 -0
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/versions_grid_panel.js +5 -28
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/article.js +22 -8
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/document.js +143 -25
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/host.js +5 -1
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/menu.js +2 -0
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/section.js +181 -65
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/website_nav_items.js +0 -0
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/hosts_tree_panel.js +0 -0
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/menu_tree_panel.js +0 -0
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/site_contents_tree_panel.js +121 -116
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/themes_tree_panel.js +101 -10
- data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/west_region.js +9 -5
- data/app/assets/javascripts/knitkit-web.js +22 -0
- data/app/assets/javascripts/knitkit/additional-methods.min.js +4 -0
- data/app/assets/javascripts/knitkit/bootstrap.min.js +7 -0
- data/app/assets/javascripts/knitkit/captcha.js +154 -0
- data/{public → app/assets}/javascripts/knitkit/confirm-bootstrap.js +1 -1
- data/{public → app/assets}/javascripts/knitkit/inline_editing.js +1 -1
- data/{public → app/assets}/javascripts/knitkit/jquery.maskedinput.min.js +0 -0
- data/app/assets/javascripts/knitkit/jquery.validate.min.js +4 -0
- data/app/assets/javascripts/knitkit/js.cookie.js +145 -0
- data/{public → app/assets}/javascripts/knitkit/theme.js +0 -0
- data/app/assets/stylesheets/erp_app/desktop/applications/knitkit/app.css +12 -0
- data/{public → app/assets}/stylesheets/erp_app/desktop/applications/knitkit/knitkit.css +23 -33
- data/app/assets/stylesheets/erp_app/shared/knitkit_shared.css +21 -0
- data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.svg +288 -0
- data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/app/assets/stylesheets/knitkit-web.css +16 -0
- data/app/assets/stylesheets/knitkit/bootstrap.min.css +5 -0
- data/app/assets/stylesheets/knitkit/captcha.css +59 -0
- data/app/assets/stylesheets/knitkit/custom.css +144 -0
- data/{public → app/assets}/stylesheets/knitkit/inline_editing.css +0 -0
- data/app/assets/stylesheets/knitkit/submenu.css +93 -0
- data/app/controllers/api/v1/websites_controller.rb +14 -0
- data/app/controllers/captcha_controller.rb +53 -0
- data/app/controllers/knitkit/base_controller.rb +1 -5
- data/app/controllers/knitkit/erp_app/desktop/app_controller.rb +2 -9
- data/app/controllers/knitkit/erp_app/desktop/articles_controller.rb +20 -7
- data/app/controllers/knitkit/erp_app/desktop/file_assets_controller.rb +38 -28
- data/app/controllers/knitkit/erp_app/desktop/image_assets_controller.rb +16 -9
- data/app/controllers/knitkit/erp_app/desktop/online_document_sections_controller.rb +69 -15
- data/app/controllers/knitkit/erp_app/desktop/position_controller.rb +45 -58
- data/app/controllers/knitkit/erp_app/desktop/theme_controller.rb +64 -29
- data/app/controllers/knitkit/erp_app/desktop/website_controller.rb +36 -13
- data/app/controllers/knitkit/erp_app/desktop/website_host_controller.rb +12 -0
- data/app/controllers/knitkit/erp_app/desktop/website_nav_controller.rb +4 -11
- data/app/controllers/knitkit/erp_app/desktop/website_nav_item_controller.rb +2 -9
- data/app/controllers/knitkit/erp_app/desktop/website_section_controller.rb +56 -20
- data/app/controllers/knitkit/online_document_sections_controller.rb +9 -3
- data/app/mailers/website_inquiry_mailer.rb +11 -3
- data/app/models/content.rb +16 -6
- data/app/models/documented_item.rb +12 -1
- data/app/models/online_document_section.rb +54 -20
- data/app/models/published_website.rb +16 -0
- data/app/models/theme.rb +53 -47
- data/app/models/website.rb +172 -191
- data/app/models/website_section.rb +64 -30
- data/app/views/knitkit/blogs/show.html.erb +5 -2
- data/app/views/layouts/knitkit/base.html.erb +54 -51
- data/app/views/menus/knitkit/_default_menu.html.erb +11 -11
- data/app/views/menus/knitkit/_default_section_menu.html.erb +2 -2
- data/app/views/menus/knitkit/_default_sub_menu.erb +27 -0
- data/app/views/menus/knitkit/_default_sub_section_menu.html.erb +30 -0
- data/app/views/website_inquiry_mailer/inquiry.html.erb +266 -0
- data/app/widgets/contact_us/base.rb +26 -16
- data/app/widgets/contact_us/javascript/contact_us.js +1 -1
- data/app/widgets/contact_us/views/error.html.erb +7 -3
- data/app/widgets/contact_us/views/index.html.erb +36 -28
- data/app/widgets/google_map/javascript/google_map.js +1 -1
- data/app/widgets/google_map/views/index.html.erb +1 -1
- data/app/widgets/login/javascript/login.js +1 -1
- data/app/widgets/login/views/index.html.erb +1 -1
- data/app/widgets/manage_profile/base.rb +141 -112
- data/app/widgets/manage_profile/javascript/manage_profile.js +2 -2
- data/app/widgets/manage_profile/views/_password_form.html.erb +1 -1
- data/app/widgets/manage_profile/views/_user_information_form.html.erb +1 -30
- data/app/widgets/manage_profile/views/index.html.erb +42 -40
- data/app/widgets/reset_password/base.rb +39 -8
- data/app/widgets/reset_password/javascript/reset_password.js +1 -1
- data/app/widgets/reset_password/views/index.html.erb +3 -3
- data/app/widgets/reset_password/views/invalid_reset_token.html.erb +7 -0
- data/app/widgets/reset_password/views/layouts/base.html.erb +1 -1
- data/app/widgets/reset_password/views/reset_password.html.erb +39 -0
- data/app/widgets/reset_password/views/reset_success.html.erb +5 -0
- data/app/widgets/search/base.rb +5 -5
- data/app/widgets/search/javascript/search.js +6 -6
- data/app/widgets/search/views/_inline_search_form.html.erb +23 -12
- data/app/widgets/search/views/_search_form.html.erb +34 -30
- data/app/widgets/search/views/layouts/base.html.erb +6 -1
- data/app/widgets/signup/base.rb +73 -30
- data/app/widgets/signup/javascript/signup.js +1 -1
- data/app/widgets/signup/views/_signup_form.html.erb +2 -1
- data/app/widgets/signup/views/layouts/base.html.erb +1 -1
- data/app/widgets/signup/views/success.html.erb +2 -3
- data/config/routes.rb +25 -4
- data/db/data_migrations/20110509223702_add_publisher_role.rb +0 -2
- data/db/data_migrations/20110816153456_add_knitkit_application.rb +7 -15
- data/db/data_migrations/20120127150505_create_website_default_configuration.rb +63 -3
- data/db/data_migrations/20150118180450_add_website_member_roles.rb +12 -0
- data/db/data_migrations/20150414150359_nest_knitkit_security_roles.rb +35 -0
- data/db/data_migrations/20150414173437_move_website_roles_under_website_builder.rb +19 -0
- data/db/migrate/20110211002317_setup_knitkit.rb +86 -39
- data/lib/knitkit.rb +8 -2
- data/lib/knitkit/config.rb +2 -3
- data/lib/knitkit/engine.rb +35 -4
- data/lib/knitkit/extensions.rb +2 -1
- data/lib/knitkit/extensions/action_controller/theme_support/acts_as_themed_controller.rb +1 -1
- data/lib/knitkit/extensions/action_mailer/theme_support/acts_as_themed_mailer.rb +1 -1
- data/lib/knitkit/extensions/compass_ae/mailers/user_mailer.rb +31 -0
- data/lib/knitkit/extensions/compass_ae/widgets/base.rb +1 -1
- data/lib/knitkit/extensions/railties/action_controller/captcha_helper.rb +43 -0
- data/lib/knitkit/extensions/railties/action_view/helpers/content_helper.rb +1 -1
- data/lib/knitkit/extensions/railties/action_view/helpers/menu_helper.rb +11 -1
- data/lib/knitkit/extensions/railties/theme_support/asset_tag_helper.rb +83 -0
- data/lib/knitkit/routing_filter/section_router.rb +24 -14
- data/lib/knitkit/version.rb +1 -1
- data/lib/tasks/knitkit_tasks.rake +89 -4
- data/lib/tasks/theme_parser.rake +85 -0
- data/public/fonts/glyphicons-halflings-regular.eot +0 -0
- data/public/fonts/glyphicons-halflings-regular.svg +288 -0
- data/public/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/public/fonts/glyphicons-halflings-regular.woff +0 -0
- data/public/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/public/paypal-button.min.js +7 -0
- metadata +161 -82
- data/app/assets/javascripts/knitkit/application.js +0 -9
- data/app/assets/stylesheets/knitkit/application.css +0 -7
- data/app/mailers/document_mailer.rb +0 -10
- data/app/views/document_mailer/email_document.html.erb +0 -12
- data/app/views/knitkit/mobile/index.html.erb +0 -162
- data/app/views/knitkit/online_document_sections/index.html.erb +0 -279
- data/app/views/layouts/knitkit/online_document_sections.html.erb +0 -80
- data/app/views/website_inquiry_mailer/inquiry.erb +0 -24
- data/db/data_migrations/20120127150506_add_primary_host_to_website_configuration.rb +0 -33
- data/db/data_migrations/20120316150424_add_is_template_to_default_website_config.rb +0 -16
- data/db/data_migrations/20120809020508_update_website_and_configuration.rb +0 -82
- data/db/data_migrations/20121129185611_upgrade_website_role_iid.rb +0 -20
- data/db/migrate/20130405184234_add_use_markdown_to_section.rb +0 -19
- data/db/migrate/20131112013052_add_knitkit_missing_indexes.rb +0 -33
- data/db/migrate/20140622212723_update_website_inquiries.rb +0 -22
- data/db/migrate/20140911185022_add_publishing_to_website.rb +0 -5
- data/db/migrate/20141013073349_add_custom_fields_to_documents.rb +0 -12
- data/db/migrate/20141016101936_upgrade_remove_dynamic_attributes.rb +0 -13
- data/lib/knitkit/extensions/railties/theme_support/theme_file_resolver.rb +0 -49
- data/public/images/knitkit/close_window.png +0 -0
- data/public/images/knitkit/splash/splash.png +0 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/comments_grid_panel.js +0 -215
- data/public/javascripts/erp_app/desktop/applications/knitkit/select_roles_window.js +0 -108
- data/public/javascripts/erp_app/desktop/applications/knitkit/splash_screen.js +0 -170
- data/public/javascripts/knitkit/bootstrap-datepicker.js +0 -474
- data/public/javascripts/knitkit/bootstrap.min.js +0 -7
- data/public/javascripts/knitkit/mobile/app/view/Main.js +0 -108
- data/public/javascripts/knitkit/mobile/ux/slidenavigation/View.js +0 -734
- data/public/stylesheets/knitkit/bootstrap-responsive.min.css +0 -10
- data/public/stylesheets/knitkit/bootstrap.min.css +0 -7
- data/public/stylesheets/knitkit/custom.css +0 -122
- data/public/stylesheets/knitkit/datepicker.css +0 -182
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9519e8e75b013f60179c1b6e027d8256aae8657
|
4
|
+
data.tar.gz: 29965c46fb5fd3b235e17aa45c53d43082809f59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b2d4d334fd89d292716c1f88e47ef81074a0949103de7ef7c8a8c6ac1a4b1d2ce31448ed20acb59a7517dd967c22649e1e754b681ddacb86b6ba27370efa523
|
7
|
+
data.tar.gz: 88b683d037a27785f13ebf4e5b117e5f843824c42c170b99e09f95081d66f4fc690b56991827037edf29c558db2a4f72ced52ec02feb15b9082d9dd18d2bd1f8
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
Binary file
|
File without changes
|
File without changes
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
Binary file
|
Binary file
|
File without changes
|
File without changes
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,24 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require ./module
|
14
|
+
//= require ./articles_grid_panel
|
15
|
+
//= require ./center_region
|
16
|
+
//= require ./comments_grid_panel
|
17
|
+
//= require ./inquiries_grid_panel
|
18
|
+
//= require ./publish_window
|
19
|
+
//= require ./published_grid_panel
|
20
|
+
//= require ./splash_screen
|
21
|
+
//= require ./versions_grid_panel
|
22
|
+
//= require_tree ./east_region
|
23
|
+
//= require_tree ./top_menu
|
24
|
+
//= require_tree ./west_region
|
data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/articles_grid_panel.js
RENAMED
@@ -29,11 +29,11 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.ArticlesGridPanel", {
|
|
29
29
|
|
30
30
|
editArticle: function (record) {
|
31
31
|
var self = this;
|
32
|
-
var itemId = 'editArticle-' + record.get('
|
32
|
+
var itemId = 'editArticle-' + record.get('recordId');
|
33
33
|
var editArticleWindow = Ext.ComponentQuery.query('#' + itemId).first();
|
34
34
|
|
35
35
|
if (Compass.ErpApp.Utility.isBlank(editArticleWindow)) {
|
36
|
-
|
36
|
+
editArticleWindow = Ext.create("Ext.window.Window", {
|
37
37
|
layout: 'fit',
|
38
38
|
width: 375,
|
39
39
|
title: 'Edit Article',
|
@@ -110,7 +110,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.ArticlesGridPanel", {
|
|
110
110
|
allowBlank: false,
|
111
111
|
name: 'id',
|
112
112
|
itemId: 'record_id',
|
113
|
-
value: record.
|
113
|
+
value: record.get('recordId')
|
114
114
|
}
|
115
115
|
]
|
116
116
|
},
|
@@ -233,7 +233,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.ArticlesGridPanel", {
|
|
233
233
|
flex: 1,
|
234
234
|
items: [
|
235
235
|
{
|
236
|
-
icon: '/
|
236
|
+
icon: '/assets/icons/edit/edit_16x16.png',
|
237
237
|
iconCls: 'actioncolumn_hover',
|
238
238
|
tooltip: 'Edit',
|
239
239
|
handler: function (grid, rowIndex, colIndex) {
|
@@ -255,7 +255,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.ArticlesGridPanel", {
|
|
255
255
|
flex: 1,
|
256
256
|
items: [
|
257
257
|
{
|
258
|
-
icon: '/
|
258
|
+
icon: '/assets/icons/document/document_16x16.png',
|
259
259
|
iconCls: 'actioncolumn_hover',
|
260
260
|
tooltip: 'Comments',
|
261
261
|
handler: function (grid, rowIndex, colIndex) {
|
@@ -278,7 +278,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.ArticlesGridPanel", {
|
|
278
278
|
flex: 1,
|
279
279
|
items: [
|
280
280
|
{
|
281
|
-
icon: '/
|
281
|
+
icon: '/assets/icons/edit/edit_16x16.png',
|
282
282
|
iconCls: 'actioncolumn_hover',
|
283
283
|
tooltip: 'Edit Excerpt',
|
284
284
|
handler: function (grid, rowIndex, colIndex) {
|
@@ -301,7 +301,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.ArticlesGridPanel", {
|
|
301
301
|
flex: 1,
|
302
302
|
items: [
|
303
303
|
{
|
304
|
-
icon: '/
|
304
|
+
icon: '/assets/icons/edit/edit_16x16.png',
|
305
305
|
iconCls: 'actioncolumn_hover',
|
306
306
|
tooltip: 'Edit Content',
|
307
307
|
handler: function (grid, rowIndex, colIndex) {
|
@@ -324,7 +324,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.ArticlesGridPanel", {
|
|
324
324
|
flex: 1,
|
325
325
|
items: [
|
326
326
|
{
|
327
|
-
icon: '/
|
327
|
+
icon: '/assets/icons/delete/delete_16x16.png',
|
328
328
|
iconCls: 'actioncolumn_hover',
|
329
329
|
tooltip: 'Delete',
|
330
330
|
handler: function (grid, rowIndex, colIndex) {
|
@@ -353,10 +353,12 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.ArticlesGridPanel", {
|
|
353
353
|
text: 'New Article',
|
354
354
|
iconCls: 'icon-add',
|
355
355
|
handler: function () {
|
356
|
-
Ext.create('widget.window', {
|
356
|
+
var addArticleWindow = Ext.create('widget.window', {
|
357
|
+
modal: true,
|
357
358
|
title: 'New Article',
|
358
359
|
buttonAlign: 'center',
|
359
|
-
items:
|
360
|
+
items: {
|
361
|
+
xtype: 'form',
|
360
362
|
labelWidth: 110,
|
361
363
|
frame: false,
|
362
364
|
bodyStyle: 'padding:5px 5px 0',
|
@@ -404,7 +406,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.ArticlesGridPanel", {
|
|
404
406
|
// id: 'tag_list'
|
405
407
|
}
|
406
408
|
]
|
407
|
-
}
|
409
|
+
},
|
408
410
|
buttons: [
|
409
411
|
{
|
410
412
|
text: 'Submit',
|
@@ -707,4 +709,5 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.ArticlesGridPanel", {
|
|
707
709
|
|
708
710
|
this.callParent([config]);
|
709
711
|
}
|
710
|
-
})
|
712
|
+
})
|
713
|
+
;
|
data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/center_region.js
RENAMED
@@ -47,8 +47,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
47
47
|
|
48
48
|
/* sections */
|
49
49
|
|
50
|
-
saveSectionLayout: function (id,
|
51
|
-
jcomp = comp;
|
50
|
+
saveSectionLayout: function (id, codeMirrorComp, content) {
|
52
51
|
var self = this;
|
53
52
|
this.setWindowStatus('Saving...');
|
54
53
|
Ext.Ajax.request({
|
@@ -71,7 +70,8 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
71
70
|
else {
|
72
71
|
Ext.Msg.alert('Error', obj.message);
|
73
72
|
}
|
74
|
-
|
73
|
+
|
74
|
+
codeMirrorComp.focus();
|
75
75
|
},
|
76
76
|
failure: function (response) {
|
77
77
|
self.clearWindowStatus();
|
@@ -90,8 +90,9 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
90
90
|
layout: 'border',
|
91
91
|
title: sectionName,
|
92
92
|
save: function (comp) {
|
93
|
-
var
|
94
|
-
|
93
|
+
var codeMirrorComp = comp.down('codemirror');
|
94
|
+
var content = codeMirrorComp.getValue();
|
95
|
+
self.saveSectionLayout(websiteSectionId, codeMirrorComp, content);
|
95
96
|
},
|
96
97
|
closable: true,
|
97
98
|
itemId: itemId,
|
@@ -101,8 +102,8 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
101
102
|
tbarItems: tbarItems,
|
102
103
|
disableSave: true,
|
103
104
|
listeners: {
|
104
|
-
save: function (
|
105
|
-
self.saveSectionLayout(websiteSectionId,
|
105
|
+
save: function (codeMirrorComp, content) {
|
106
|
+
self.saveSectionLayout(websiteSectionId, codeMirrorComp, content);
|
106
107
|
}
|
107
108
|
},
|
108
109
|
xtype: 'codemirror',
|
@@ -230,7 +231,8 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
230
231
|
if (!obj.success) {
|
231
232
|
Ext.Msg.alert('Error', obj.message);
|
232
233
|
}
|
233
|
-
|
234
|
+
|
235
|
+
comp.focus();
|
234
236
|
},
|
235
237
|
failure: function (response) {
|
236
238
|
self.clearWindowStatus();
|
@@ -266,8 +268,9 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
266
268
|
itemId: itemId,
|
267
269
|
layout: 'fit',
|
268
270
|
save: function (comp) {
|
269
|
-
var
|
270
|
-
|
271
|
+
var codeMirrorComp = comp.down('codemirror');
|
272
|
+
var content = codeMirrorComp.getValue();
|
273
|
+
self.saveTemplateFile(node.data.id, codeMirrorComp, content);
|
271
274
|
},
|
272
275
|
items: [
|
273
276
|
{
|
@@ -275,8 +278,8 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
275
278
|
disableSave: true,
|
276
279
|
xtype: 'codemirror',
|
277
280
|
listeners: {
|
278
|
-
save: function (
|
279
|
-
self.saveTemplateFile(node.data.id,
|
281
|
+
save: function (codeMirrorComp, content) {
|
282
|
+
self.saveTemplateFile(node.data.id, codeMirrorComp, content);
|
280
283
|
}
|
281
284
|
},
|
282
285
|
mode: mode,
|
@@ -342,7 +345,6 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
342
345
|
if (Compass.ErpApp.Utility.isBlank(item)) {
|
343
346
|
var ckEditor = Ext.create("Compass.ErpApp.Shared.CKeditor", {
|
344
347
|
autoHeight: true,
|
345
|
-
//value:content,
|
346
348
|
ckEditorConfig: {
|
347
349
|
extraPlugins: self.ckEditorExtraPlugins,
|
348
350
|
toolbar: self.ckEditorToolbar
|
@@ -356,7 +358,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
356
358
|
var dataTransfer = dropEvent.dataTransfer;
|
357
359
|
var files = dataTransfer.files;
|
358
360
|
for (var i = 0; i < files.length; i++) {
|
359
|
-
var loadMask = new Ext.LoadMask(ckeditorPanel, {msg:"Please wait..."});
|
361
|
+
var loadMask = new Ext.LoadMask(ckeditorPanel, {msg: "Please wait..."});
|
360
362
|
loadMask.show();
|
361
363
|
|
362
364
|
var file = files[i];
|
@@ -369,35 +371,35 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
369
371
|
headers: {'Content-Type': file.type},
|
370
372
|
url: '/knitkit/erp_app/desktop/image_assets/shared/upload_file',
|
371
373
|
jsonData: bin,
|
372
|
-
params:{
|
374
|
+
params: {
|
373
375
|
name: file.name,
|
374
376
|
directory: 'root_node',
|
375
377
|
is_drag_drop: true
|
376
378
|
},
|
377
|
-
success: function(result){
|
379
|
+
success: function (result) {
|
378
380
|
loadMask.hide();
|
379
381
|
resultObj = Ext.JSON.decode(result.responseText);
|
380
|
-
if(resultObj.success){
|
381
|
-
ckeditorPanel.insertHtml('<img src='+resultObj.url+' height="200" width="200" />');
|
382
|
+
if (resultObj.success) {
|
383
|
+
ckeditorPanel.insertHtml('<img src=' + resultObj.url + ' height="200" width="200" />');
|
382
384
|
var sharedImageAssetsDataView = self.up('#knitkit').down('knitkit_ImageAssetsPanel').sharedImageAssetsDataView,
|
383
385
|
sharedImageAssetsTreePanel = self.up('#knitkit').down('knitkit_ImageAssetsPanel').sharedImageAssetsTreePanel;
|
384
386
|
|
385
387
|
sharedImageAssetsDataView.getStore().load({
|
386
|
-
params:{
|
388
|
+
params: {
|
387
389
|
directory: sharedImageAssetsDataView.directory
|
388
390
|
}
|
389
391
|
});
|
390
392
|
sharedImageAssetsTreePanel.getStore().load({
|
391
|
-
callback:function(){
|
393
|
+
callback: function () {
|
392
394
|
sharedImageAssetsTreePanel.getView().refresh();
|
393
395
|
}
|
394
396
|
});
|
395
397
|
}
|
396
|
-
else{
|
398
|
+
else {
|
397
399
|
Ext.Msg.alert('Error', 'Could not upload image');
|
398
400
|
}
|
399
401
|
},
|
400
|
-
failure: function(result){
|
402
|
+
failure: function (result) {
|
401
403
|
loadMask.hide();
|
402
404
|
Ext.Msg.alert('Error', 'Could not upload image');
|
403
405
|
}
|
@@ -468,6 +470,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
468
470
|
}
|
469
471
|
|
470
472
|
this.workArea.setActiveTab(item);
|
473
|
+
|
471
474
|
},
|
472
475
|
|
473
476
|
/* image */
|
@@ -476,7 +479,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
476
479
|
var self = this;
|
477
480
|
var fileName = node.data.id.split('/').pop().split('.')[0];
|
478
481
|
var fileType = node.data.id.split('.').pop();
|
479
|
-
var itemId =
|
482
|
+
var itemId = Compass.ErpApp.Utility.Encryption.MD5(node.data.id);
|
480
483
|
var item = this.workArea.query('#' + itemId).first();
|
481
484
|
|
482
485
|
if (Compass.ErpApp.Utility.isBlank(item)) {
|
@@ -488,10 +491,10 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
488
491
|
html: '<img src="' + node.data.url + '" />'
|
489
492
|
});
|
490
493
|
|
491
|
-
|
494
|
+
self.workArea.add(item);
|
492
495
|
}
|
493
496
|
|
494
|
-
|
497
|
+
self.workArea.setActiveTab(item);
|
495
498
|
return false;
|
496
499
|
},
|
497
500
|
|
@@ -561,14 +564,14 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
561
564
|
this.workArea.setActiveTab(item);
|
562
565
|
},
|
563
566
|
|
564
|
-
openIframeInTab
|
567
|
+
openIframeInTab: function (title, url) {
|
565
568
|
|
566
569
|
var item = Ext.create('Ext.panel.Panel', {
|
567
|
-
iframeId:'themes_iframe',
|
570
|
+
iframeId: 'themes_iframe',
|
568
571
|
closable: true,
|
569
572
|
layout: 'fit',
|
570
573
|
title: title,
|
571
|
-
html:'<iframe height="100%" width="100%" frameBorder="0" src="'+url+'"></iframe>'
|
574
|
+
html: '<iframe height="100%" width="100%" frameBorder="0" src="' + url + '"></iframe>'
|
572
575
|
});
|
573
576
|
|
574
577
|
this.workArea.add(item);
|
@@ -597,7 +600,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
597
600
|
var dataTransfer = dropEvent.dataTransfer;
|
598
601
|
var files = dataTransfer.files;
|
599
602
|
for (var i = 0; i < files.length; i++) {
|
600
|
-
var loadMask = new Ext.LoadMask(ckeditorPanel, {msg:"Please wait..."});
|
603
|
+
var loadMask = new Ext.LoadMask(ckeditorPanel, {msg: "Please wait..."});
|
601
604
|
loadMask.show();
|
602
605
|
|
603
606
|
var file = files[i];
|
@@ -610,35 +613,35 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
610
613
|
headers: {'Content-Type': file.type},
|
611
614
|
url: '/knitkit/erp_app/desktop/image_assets/shared/upload_file',
|
612
615
|
jsonData: bin,
|
613
|
-
params:{
|
616
|
+
params: {
|
614
617
|
name: file.name,
|
615
618
|
directory: 'root_node',
|
616
619
|
is_drag_drop: true
|
617
620
|
},
|
618
|
-
success: function(result){
|
621
|
+
success: function (result) {
|
619
622
|
loadMask.hide();
|
620
623
|
resultObj = Ext.JSON.decode(result.responseText);
|
621
|
-
if(resultObj.success){
|
622
|
-
ckeditorPanel.insertHtml('<img src='+resultObj.url+' height="200" width="200" />');
|
624
|
+
if (resultObj.success) {
|
625
|
+
ckeditorPanel.insertHtml('<img src=' + resultObj.url + ' height="200" width="200" />');
|
623
626
|
var sharedImageAssetsDataView = self.up('#knitkit').down('knitkit_ImageAssetsPanel').sharedImageAssetsDataView,
|
624
627
|
sharedImageAssetsTreePanel = self.up('#knitkit').down('knitkit_ImageAssetsPanel').sharedImageAssetsTreePanel;
|
625
628
|
|
626
629
|
sharedImageAssetsDataView.getStore().load({
|
627
|
-
params:{
|
630
|
+
params: {
|
628
631
|
directory: sharedImageAssetsDataView.directory
|
629
632
|
}
|
630
633
|
});
|
631
634
|
sharedImageAssetsTreePanel.getStore().load({
|
632
|
-
callback:function(){
|
635
|
+
callback: function () {
|
633
636
|
sharedImageAssetsTreePanel.getView().refresh();
|
634
637
|
}
|
635
638
|
});
|
636
639
|
}
|
637
|
-
else{
|
640
|
+
else {
|
638
641
|
Ext.Msg.alert('Error', 'Could not upload image');
|
639
642
|
}
|
640
643
|
},
|
641
|
-
failure: function(result){
|
644
|
+
failure: function (result) {
|
642
645
|
loadMask.hide();
|
643
646
|
Ext.Msg.alert('Error', 'Could not upload image');
|
644
647
|
}
|
@@ -719,7 +722,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
719
722
|
cardPanel.removeAll(true);
|
720
723
|
cardPanel.add({
|
721
724
|
xtype: 'panel',
|
722
|
-
html: comment
|
725
|
+
html: '<div style="padding:10px;">'+comment+'</div>'
|
723
726
|
});
|
724
727
|
cardPanel.getLayout().setActiveItem(0);
|
725
728
|
},
|
@@ -858,10 +861,6 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
858
861
|
activeTab.query('codemirror')[0].insertContent(content);
|
859
862
|
}
|
860
863
|
}
|
861
|
-
return false;
|
862
|
-
this.workArea.add(item);
|
863
|
-
|
864
|
-
this.workArea.setActiveTab(item);
|
865
864
|
},
|
866
865
|
|
867
866
|
insertHtmlIntoActiveCkEditorOrCodemirror: function (html) {
|
@@ -913,16 +912,29 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
913
912
|
handler: function (item) {
|
914
913
|
currentItem.tab.setClosable(item.checked);
|
915
914
|
}
|
915
|
+
},
|
916
|
+
'-',
|
917
|
+
{
|
918
|
+
text: 'Enabled',
|
919
|
+
checked: true,
|
920
|
+
hideOnClick: true,
|
921
|
+
handler: function (item) {
|
922
|
+
currentItem.tab.setDisabled(!item.checked);
|
923
|
+
}
|
916
924
|
}
|
917
925
|
],
|
918
926
|
listeners: {
|
919
|
-
aftermenu: function () {
|
920
|
-
currentItem = null;
|
921
|
-
},
|
922
927
|
beforemenu: function (menu, item) {
|
923
|
-
var
|
928
|
+
var enabled = menu.child('[text="Enabled"]');
|
929
|
+
menu.child('[text="Closable"]').setChecked(item.closable);
|
930
|
+
if (item.tab.active) {
|
931
|
+
enabled.disable();
|
932
|
+
} else {
|
933
|
+
enabled.enable();
|
934
|
+
enabled.setChecked(!item.tab.isDisabled());
|
935
|
+
}
|
936
|
+
|
924
937
|
currentItem = item;
|
925
|
-
menuitem.setChecked(item.closable);
|
926
938
|
}
|
927
939
|
}
|
928
940
|
}),
|
@@ -932,6 +944,15 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
932
944
|
},
|
933
945
|
remove: function () {
|
934
946
|
this.smartRenameTabs();
|
947
|
+
},
|
948
|
+
tabchange: function (tabPanel, newPanel, oldPanel, eOpts) {
|
949
|
+
// check if the panel has ckEditor
|
950
|
+
var ckEditor = newPanel.down('ckeditor');
|
951
|
+
if (ckEditor) {
|
952
|
+
CKEDITOR.domReady(function () {
|
953
|
+
ckEditor.ckEditorInstance.focus();
|
954
|
+
});
|
955
|
+
}
|
935
956
|
}
|
936
957
|
},
|
937
958
|
|
@@ -996,4 +1017,4 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
|
|
996
1017
|
|
997
1018
|
this.callParent([config]);
|
998
1019
|
}
|
999
|
-
});
|
1020
|
+
});
|