jinda_engine 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +173 -0
- data/Rakefile +32 -0
- data/app/assets/config/jinda_engine/manifest.js +4 -0
- data/app/assets/images/jinda_engine/4dcity-old.ico +0 -0
- data/app/assets/images/jinda_engine/4dcity.ico +0 -0
- data/app/assets/images/jinda_engine/account.png +0 -0
- data/app/assets/images/jinda_engine/add.png +0 -0
- data/app/assets/images/jinda_engine/ajax-loader-circle.gif +0 -0
- data/app/assets/images/jinda_engine/ajax-loader.gif +0 -0
- data/app/assets/images/jinda_engine/anchor.png +0 -0
- data/app/assets/images/jinda_engine/application_double.png +0 -0
- data/app/assets/images/jinda_engine/application_form_edit.png +0 -0
- data/app/assets/images/jinda_engine/arrow_left.png +0 -0
- data/app/assets/images/jinda_engine/arrow_right.png +0 -0
- data/app/assets/images/jinda_engine/arrow_turn_left.png +0 -0
- data/app/assets/images/jinda_engine/arrow_turn_right.png +0 -0
- data/app/assets/images/jinda_engine/calendar.png +0 -0
- data/app/assets/images/jinda_engine/cancel.png +0 -0
- data/app/assets/images/jinda_engine/chart_bar.png +0 -0
- data/app/assets/images/jinda_engine/clock.png +0 -0
- data/app/assets/images/jinda_engine/cog.png +0 -0
- data/app/assets/images/jinda_engine/control_fastforward.png +0 -0
- data/app/assets/images/jinda_engine/control_play.png +0 -0
- data/app/assets/images/jinda_engine/cross.png +0 -0
- data/app/assets/images/jinda_engine/delete.png +0 -0
- data/app/assets/images/jinda_engine/external-link.png +0 -0
- data/app/assets/images/jinda_engine/facebook-continue-button.png +0 -0
- data/app/assets/images/jinda_engine/facebooksmall.png +0 -0
- data/app/assets/images/jinda_engine/favicon.ico +0 -0
- data/app/assets/images/jinda_engine/freemind(mm).png +0 -0
- data/app/assets/images/jinda_engine/google-continue-button.png +0 -0
- data/app/assets/images/jinda_engine/help.png +0 -0
- data/app/assets/images/jinda_engine/highway-menu.png +0 -0
- data/app/assets/images/jinda_engine/highway.png +0 -0
- data/app/assets/images/jinda_engine/house.png +0 -0
- data/app/assets/images/jinda_engine/icons-18-black.png +0 -0
- data/app/assets/images/jinda_engine/icons-18-white.png +0 -0
- data/app/assets/images/jinda_engine/icons-36-black.png +0 -0
- data/app/assets/images/jinda_engine/icons-36-white.png +0 -0
- data/app/assets/images/jinda_engine/logo.png +0 -0
- data/app/assets/images/jinda_engine/logo_jinda.png +0 -0
- data/app/assets/images/jinda_engine/logout.png +0 -0
- data/app/assets/images/jinda_engine/new.gif +0 -0
- data/app/assets/images/jinda_engine/new.png +0 -0
- data/app/assets/images/jinda_engine/page.png +0 -0
- data/app/assets/images/jinda_engine/page_attach.png +0 -0
- data/app/assets/images/jinda_engine/page_green.png +0 -0
- data/app/assets/images/jinda_engine/page_output.png +0 -0
- data/app/assets/images/jinda_engine/page_pdf.png +0 -0
- data/app/assets/images/jinda_engine/pencil.png +0 -0
- data/app/assets/images/jinda_engine/printer.png +0 -0
- data/app/assets/images/jinda_engine/refresh.png +0 -0
- data/app/assets/images/jinda_engine/report.png +0 -0
- data/app/assets/images/jinda_engine/rssmall.png +0 -0
- data/app/assets/images/jinda_engine/tick.png +0 -0
- data/app/assets/images/jinda_engine/twittersmall.png +0 -0
- data/app/assets/images/jinda_engine/user.png +0 -0
- data/app/assets/images/jinda_engine/user_admin_gear.png +0 -0
- data/app/assets/images/jinda_engine/view_code.png +0 -0
- data/app/assets/javascripts/jinda_engine/application.js +24 -0
- data/app/assets/javascripts/jinda_engine/application.js-jqm +27 -0
- data/app/assets/javascripts/jinda_engine/cable.js +13 -0
- data/app/assets/javascripts/jinda_engine/disable_enter_key.js +10 -0
- data/app/assets/javascripts/jinda_engine/iscroll-wrapper.js +32 -0
- data/app/assets/javascripts/jinda_engine/iscroll.js +1084 -0
- data/app/assets/javascripts/jinda_engine/jinda.js +14 -0
- data/app/assets/javascripts/jinda_engine/jquery.mobile-1.2.1.js +9272 -0
- data/app/assets/javascripts/jinda_engine/jquery.mobile.datebox.js +1778 -0
- data/app/assets/javascripts/jinda_engine/jquery.mobile.splitview.js +695 -0
- data/app/assets/stylesheets/jinda_engine/app.scss +90 -0
- data/app/assets/stylesheets/jinda_engine/application.css.scss +34 -0
- data/app/assets/stylesheets/jinda_engine/articles.scss +94 -0
- data/app/assets/stylesheets/jinda_engine/fonts/sarabun.eot +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/sarabun.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/sarabun.woff +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/sarabun_bold.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/sarabun_bolditalic.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/sarabun_italic.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew-webfont.eot +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew-webfont.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew-webfont.woff +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew.css +47 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bold-webfont.eot +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bold-webfont.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bold-webfont.woff +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bolditalic-webfont.eot +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bolditalic-webfont.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bolditalic-webfont.woff +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_italic-webfont.eot +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_italic-webfont.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_italic-webfont.woff +0 -0
- data/app/assets/stylesheets/jinda_engine/images/ajax-loader.gif +0 -0
- data/app/assets/stylesheets/jinda_engine/images/button_black.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/button_blue.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/button_red.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/icons-18-black.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/icons-18-white.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/icons-36-black.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/icons-36-white.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/indicator.gif +0 -0
- data/app/assets/stylesheets/jinda_engine/jinda.css +52 -0
- data/app/assets/stylesheets/jinda_engine/jquery.mobile-1.2.1.css +2339 -0
- data/app/assets/stylesheets/jinda_engine/jquery.mobile.datebox.css +65 -0
- data/app/assets/stylesheets/jinda_engine/jquery.mobile.grids.collapsible.css +122 -0
- data/app/assets/stylesheets/jinda_engine/jquery.mobile.splitview.css +128 -0
- data/app/assets/stylesheets/jinda_engine/kul-4.2.css +1516 -0
- data/app/assets/stylesheets/jinda_engine/kul-4.2.min.css +11 -0
- data/app/assets/stylesheets/jinda_engine/modules.scss +84 -0
- data/app/assets/stylesheets/jinda_engine/sarabun.css +37 -0
- data/app/assets/stylesheets/jinda_engine/social.scss +133 -0
- data/app/controllers/jindra_engine/admins_controller.rb +9 -0
- data/app/controllers/jindra_engine/api/v1/notes_controller.rb +81 -0
- data/app/controllers/jindra_engine/application_controller.rb +44 -0
- data/app/controllers/jindra_engine/articles_controller.rb +112 -0
- data/app/controllers/jindra_engine/comments_controller.rb +21 -0
- data/app/controllers/jindra_engine/concerns/jinda_general_concern.rb +179 -0
- data/app/controllers/jindra_engine/concerns/jinda_run_concern.rb +365 -0
- data/app/controllers/jindra_engine/devs_controller.rb +4 -0
- data/app/controllers/jindra_engine/docs_controller.rb +59 -0
- data/app/controllers/jindra_engine/identities_controller.rb +7 -0
- data/app/controllers/jindra_engine/jinda_controller.rb +71 -0
- data/app/controllers/jindra_engine/notes_controller.rb +87 -0
- data/app/controllers/jindra_engine/password_resets.rb +30 -0
- data/app/controllers/jindra_engine/password_resets_controller.rb +35 -0
- data/app/controllers/jindra_engine/sessions_controller.rb +45 -0
- data/app/controllers/jindra_engine/sitemap_controller.rb +15 -0
- data/app/controllers/jindra_engine/users_controller.rb +35 -0
- data/app/helpers/jinda_engine/jinda_helper.rb +1005 -0
- data/app/jinda/index.mm +366 -0
- data/app/jinda/template/index.mm +366 -0
- data/app/jinda/template/linkview.haml +21 -0
- data/app/jinda/template/view.html.erb +26 -0
- data/app/mailers/jinda_engine/application_mailer.rb +4 -0
- data/app/mailers/jinda_engine/jinda_mailer.rb +7 -0
- data/app/mailers/jinda_engine/note_mailer.rb +10 -0
- data/app/mailers/jinda_engine/user_mailer.rb +15 -0
- data/app/views/jinda_engine/adminbsbs/content.haml +241 -0
- data/app/views/jinda_engine/admins/edit_role/edit_role.html.erb +7 -0
- data/app/views/jinda_engine/admins/edit_role/select_user.html.erb +4 -0
- data/app/views/jinda_engine/api/v1/note.haml +0 -0
- data/app/views/jinda_engine/articles/edit.haml +12 -0
- data/app/views/jinda_engine/articles/edit_article/edit_article.html.erb +13 -0
- data/app/views/jinda_engine/articles/edit_article/select_article.html.erb +12 -0
- data/app/views/jinda_engine/articles/index.haml +23 -0
- data/app/views/jinda_engine/articles/my.haml +20 -0
- data/app/views/jinda_engine/articles/new_article/form_article.html.erb +16 -0
- data/app/views/jinda_engine/articles/show.html.haml +25 -0
- data/app/views/jinda_engine/articles/xedit_article/edit_article.html.erb +13 -0
- data/app/views/jinda_engine/ctrs/vfolder1/viewfile1.html.erb +23 -0
- data/app/views/jinda_engine/ctrs/vfolder1/viewfile2.html.erb +23 -0
- data/app/views/jinda_engine/ctrs/vfolder2/viewfile2.html.erb +23 -0
- data/app/views/jinda_engine/custom/_adsense.haml +6 -0
- data/app/views/jinda_engine/docs/doc_edit/doc_edit.html.erb +21 -0
- data/app/views/jinda_engine/docs/doc_edit/doc_select.html.erb +14 -0
- data/app/views/jinda_engine/docs/doc_new/doc_form.html.erb +26 -0
- data/app/views/jinda_engine/docs/doc_new/doc_form.md +36 -0
- data/app/views/jinda_engine/docs/doc_xedit/doc_edit.html.erb +21 -0
- data/app/views/jinda_engine/docs/edit/select_note.html.erb +14 -0
- data/app/views/jinda_engine/docs/index.haml +21 -0
- data/app/views/jinda_engine/docs/my.haml +27 -0
- data/app/views/jinda_engine/identities/new.html.erb +32 -0
- data/app/views/jinda_engine/jinda/_activity.md +10 -0
- data/app/views/jinda_engine/jinda/_menu.haml +27 -0
- data/app/views/jinda_engine/jinda/_menu_mm.haml +44 -0
- data/app/views/jinda_engine/jinda/_model.md +5 -0
- data/app/views/jinda_engine/jinda/_modul.md +9 -0
- data/app/views/jinda_engine/jinda/_pending_home.haml +5 -0
- data/app/views/jinda_engine/jinda/_pending_page.haml +24 -0
- data/app/views/jinda_engine/jinda/_service.md +24 -0
- data/app/views/jinda_engine/jinda/_static.haml +13 -0
- data/app/views/jinda_engine/jinda/doc-thai.md +37 -0
- data/app/views/jinda_engine/jinda/doc.md +36 -0
- data/app/views/jinda_engine/jinda/error_logs.haml +22 -0
- data/app/views/jinda_engine/jinda/feed.rss.builder +27 -0
- data/app/views/jinda_engine/jinda/help.haml +20 -0
- data/app/views/jinda_engine/jinda/index.html.haml +53 -0
- data/app/views/jinda_engine/jinda/logs.haml +22 -0
- data/app/views/jinda_engine/jinda/notice_logs.haml +18 -0
- data/app/views/jinda_engine/jinda/pending.haml +1 -0
- data/app/views/jinda_engine/jinda/run_form.haml +42 -0
- data/app/views/jinda_engine/jinda/run_output.haml +38 -0
- data/app/views/jinda_engine/jinda/search.haml +20 -0
- data/app/views/jinda_engine/jinda/status.haml +61 -0
- data/app/views/jinda_engine/jinda_mailer/gmail.html.erb +9 -0
- data/app/views/jinda_engine/layouts/_head.html.erb +10 -0
- data/app/views/jinda_engine/layouts/_meta_tag.html.erb +19 -0
- data/app/views/jinda_engine/layouts/application.haml +4 -0
- data/app/views/jinda_engine/layouts/bsb/_footer.haml +7 -0
- data/app/views/jinda_engine/layouts/bsb/_header.haml +147 -0
- data/app/views/jinda_engine/layouts/bsb/_menu.haml +47 -0
- data/app/views/jinda_engine/layouts/bsb/_menu_mm.haml +34 -0
- data/app/views/jinda_engine/layouts/bsb/_rightbar.haml +123 -0
- data/app/views/jinda_engine/layouts/bsb/_sidebar.haml +155 -0
- data/app/views/jinda_engine/layouts/bsb/application.haml-bsb +47 -0
- data/app/views/jinda_engine/layouts/gmail.html.erb +9 -0
- data/app/views/jinda_engine/layouts/jqm/_full.haml +33 -0
- data/app/views/jinda_engine/layouts/jqm/_page.haml +16 -0
- data/app/views/jinda_engine/layouts/jqm/application.haml-jqm +4 -0
- data/app/views/jinda_engine/layouts/mailer.html.erb +13 -0
- data/app/views/jinda_engine/layouts/mailer.html.haml +3 -0
- data/app/views/jinda_engine/layouts/mailer.text.erb +1 -0
- data/app/views/jinda_engine/layouts/mailer.text.haml +1 -0
- data/app/views/jinda_engine/layouts/mobile.html.erb +13 -0
- data/app/views/jinda_engine/layouts/mobilejq.html.erb +31 -0
- data/app/views/jinda_engine/layouts/print.html.erb +22 -0
- data/app/views/jinda_engine/layouts/utf8.html.erb +22 -0
- data/app/views/jinda_engine/note_mailer/gmail.html.haml +7 -0
- data/app/views/jinda_engine/note_mailer/gmail.text.haml +8 -0
- data/app/views/jinda_engine/notes/delete/select_note.html.erb +14 -0
- data/app/views/jinda_engine/notes/edit/edit_note.html.erb +10 -0
- data/app/views/jinda_engine/notes/edit/select_note.html.erb +14 -0
- data/app/views/jinda_engine/notes/index.haml +71 -0
- data/app/views/jinda_engine/notes/mail/display_mail.html.erb +20 -0
- data/app/views/jinda_engine/notes/mail/select_note.html.erb +19 -0
- data/app/views/jinda_engine/notes/mail/show.html.haml +13 -0
- data/app/views/jinda_engine/notes/my.haml +21 -0
- data/app/views/jinda_engine/notes/new/new_note.html.erb +13 -0
- data/app/views/jinda_engine/notes/show.haml +10 -0
- data/app/views/jinda_engine/notes/xedit/edit_note.html.erb +10 -0
- data/app/views/jinda_engine/password_resets/edit.html.erb +21 -0
- data/app/views/jinda_engine/password_resets/new.html.erb +7 -0
- data/app/views/jinda_engine/sessions/new.html.erb +20 -0
- data/app/views/jinda_engine/sitemap/index.xml.haml +10 -0
- data/app/views/jinda_engine/user_mailer/password_reset.html.haml +3 -0
- data/app/views/jinda_engine/user_mailer/password_reset.text.erb +3 -0
- data/app/views/jinda_engine/user_mailer/password_reset.text.haml +3 -0
- data/app/views/jinda_engine/users/index.haml +13 -0
- data/app/views/jinda_engine/users/pwd/enter.html.erb +6 -0
- data/app/views/jinda_engine/users/user/enter_user.html.erb +8 -0
- data/config/application.rb +58 -0
- data/config/initializers/jinda_engine/assets.rb +14 -0
- data/config/initializers/jinda_engine/jinda.rb +13 -0
- data/config/initializers/jinda_engine/mongoid.rb +9 -0
- data/config/initializers/jinda_engine/mongoid.rb-org +9 -0
- data/config/initializers/jinda_engine/omniauth.rb-org +17 -0
- data/config/jinda_engine/cloudinary.yml +9 -0
- data/config/routes.rb +18 -0
- data/db/jinda_engine/seeds.rb +6 -0
- data/lib/generators/jinda_engine/USAGE +2 -0
- data/lib/generators/jinda_engine/config_generator.rb +95 -0
- data/lib/generators/jinda_engine/install_generator.rb +237 -0
- data/lib/generators/jinda_engine/minitest_generator.rb +30 -0
- data/lib/generators/jinda_engine/rspec_generator.rb +30 -0
- data/lib/generators/jinda_engine/templates/README.md +173 -0
- data/lib/generators/jinda_engine/templates/app/assets/config/manifest.js +4 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/4dcity-old.ico +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/4dcity.ico +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/account.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/add.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/ajax-loader-circle.gif +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/ajax-loader.gif +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/anchor.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/application_double.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/application_form_edit.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/arrow_left.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/arrow_right.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/arrow_turn_left.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/arrow_turn_right.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/calendar.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/cancel.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/chart_bar.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/clock.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/cog.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/control_fastforward.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/control_play.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/cross.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/delete.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/external-link.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/facebook-continue-button.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/facebooksmall.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/favicon.ico +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/freemind(mm).png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/google-continue-button.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/help.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/highway-menu.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/highway.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/house.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/icons-18-black.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/icons-18-white.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/icons-36-black.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/icons-36-white.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/logo.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/logo_jinda.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/logout.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/new.gif +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/new.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/page.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/page_attach.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/page_green.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/page_output.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/page_pdf.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/pencil.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/printer.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/refresh.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/report.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/rssmall.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/tick.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/twittersmall.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/user.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/user_admin_gear.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/view_code.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/application.js +24 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/application.js-jqm +27 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/cable.js +13 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/disable_enter_key.js +10 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/iscroll-wrapper.js +32 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/iscroll.js +1084 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/jinda.js +14 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/jquery.mobile-1.2.1.js +9272 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/jquery.mobile.datebox.js +1778 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/jquery.mobile.splitview.js +695 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/app.scss +90 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/application.css.scss +34 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/articles.scss +94 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun.eot +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun.woff +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun_bold.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun_bolditalic.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun_italic.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew-webfont.eot +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew-webfont.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew-webfont.woff +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew.css +47 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.eot +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.woff +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.eot +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.woff +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.eot +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.woff +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/ajax-loader.gif +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/button_black.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/button_blue.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/button_red.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/icons-18-black.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/icons-18-white.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/icons-36-black.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/icons-36-white.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/indicator.gif +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jinda.css +52 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jquery.mobile-1.2.1.css +2339 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jquery.mobile.datebox.css +65 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jquery.mobile.grids.collapsible.css +122 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jquery.mobile.splitview.css +128 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/kul-4.2.css +1516 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/kul-4.2.min.css +11 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/modules.scss +84 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/sarabun.css +37 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/social.scss +133 -0
- data/lib/generators/jinda_engine/templates/app/channels/application_cable/channel.rb +4 -0
- data/lib/generators/jinda_engine/templates/app/channels/application_cable/connection.rb +4 -0
- data/lib/generators/jinda_engine/templates/app/controllers/api/v1/notes_controller.rb +81 -0
- data/lib/generators/jinda_engine/templates/app/controllers/concerns/jinda_general_concern.rb-org +179 -0
- data/lib/generators/jinda_engine/templates/app/controllers/concerns/jinda_run_concern.rb-org +365 -0
- data/lib/generators/jinda_engine/templates/app/helpers/admins_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/application_helper.rb +33 -0
- data/lib/generators/jinda_engine/templates/app/helpers/articles_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/basic_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/comments_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/ctrs_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/devs_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/pictures_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/sitemap_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/users_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/jinda/index.mm +366 -0
- data/lib/generators/jinda_engine/templates/app/jinda/template/index.mm +366 -0
- data/lib/generators/jinda_engine/templates/app/jinda/template/linkview.haml +21 -0
- data/lib/generators/jinda_engine/templates/app/jinda/template/view.html.erb +26 -0
- data/lib/generators/jinda_engine/templates/app/mailers/application_mailer.rb +4 -0
- data/lib/generators/jinda_engine/templates/app/mailers/jinda_mailer.rb +7 -0
- data/lib/generators/jinda_engine/templates/app/mailers/note_mailer.rb +10 -0
- data/lib/generators/jinda_engine/templates/app/mailers/user_mailer.rb +15 -0
- data/lib/generators/jinda_engine/templates/app/models/address.rb +14 -0
- data/lib/generators/jinda_engine/templates/app/models/article.rb +14 -0
- data/lib/generators/jinda_engine/templates/app/models/comment.rb +11 -0
- data/lib/generators/jinda_engine/templates/app/models/identity.rb +18 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/doc.rb +36 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/module.rb +11 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/notice.rb +14 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/role.rb +8 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/runseq.rb +24 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/service.rb +17 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/xmain.rb +38 -0
- data/lib/generators/jinda_engine/templates/app/models/note.rb +22 -0
- data/lib/generators/jinda_engine/templates/app/models/param.rb +41 -0
- data/lib/generators/jinda_engine/templates/app/models/person.rb +14 -0
- data/lib/generators/jinda_engine/templates/app/models/user.rb +66 -0
- data/lib/generators/jinda_engine/templates/app/views/adminbsbs/content.haml +241 -0
- data/lib/generators/jinda_engine/templates/app/views/admins/edit_role/edit_role.html.erb +7 -0
- data/lib/generators/jinda_engine/templates/app/views/admins/edit_role/select_user.html.erb +4 -0
- data/lib/generators/jinda_engine/templates/app/views/api/v1/note.haml +0 -0
- data/lib/generators/jinda_engine/templates/app/views/ctrs/vfolder1/viewfile1.html.erb +23 -0
- data/lib/generators/jinda_engine/templates/app/views/ctrs/vfolder1/viewfile2.html.erb +23 -0
- data/lib/generators/jinda_engine/templates/app/views/ctrs/vfolder2/viewfile2.html.erb +23 -0
- data/lib/generators/jinda_engine/templates/app/views/custom/_adsense.haml +6 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/doc_edit/doc_edit.html.erb +21 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/doc_edit/doc_select.html.erb +14 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/doc_new/doc_form.html.erb +26 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/doc_new/doc_form.md +36 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/doc_xedit/doc_edit.html.erb +21 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/edit/select_note.html.erb +14 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/index.haml +21 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/my.haml +27 -0
- data/lib/generators/jinda_engine/templates/app/views/identities/new.html.erb +32 -0
- data/lib/generators/jinda_engine/templates/app/views/jinda_mailer/gmail.html.erb +9 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/_head.html.erb +10 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/_meta_tag.html.erb +19 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/application.haml +4 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_footer.haml +7 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_header.haml +147 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_menu.haml +47 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_menu_mm.haml +34 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_rightbar.haml +123 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_sidebar.haml +155 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/application.haml-bsb +47 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/gmail.html.erb +9 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/jqm/_full.haml +33 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/jqm/_page.haml +16 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/jqm/application.haml-jqm +4 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/mailer.html.erb +13 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/mailer.html.haml +3 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/mailer.text.erb +1 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/mailer.text.haml +1 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/mobile.html.erb +13 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/mobilejq.html.erb +31 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/print.html.erb +22 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/utf8.html.erb +22 -0
- data/lib/generators/jinda_engine/templates/app/views/note_mailer/gmail.html.haml +7 -0
- data/lib/generators/jinda_engine/templates/app/views/note_mailer/gmail.text.haml +8 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/delete/select_note.html.erb +14 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/edit/edit_note.html.erb +10 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/edit/select_note.html.erb +14 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/index.haml +71 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/mail/display_mail.html.erb +20 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/mail/select_note.html.erb +19 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/mail/show.html.haml +13 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/my.haml +21 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/new/new_note.html.erb +13 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/show.haml +10 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/xedit/edit_note.html.erb +10 -0
- data/lib/generators/jinda_engine/templates/app/views/password_resets/edit.html.erb +21 -0
- data/lib/generators/jinda_engine/templates/app/views/password_resets/new.html.erb +7 -0
- data/lib/generators/jinda_engine/templates/app/views/sessions/new.html.erb +20 -0
- data/lib/generators/jinda_engine/templates/app/views/sitemap/index.xml.haml +10 -0
- data/lib/generators/jinda_engine/templates/app/views/user_mailer/password_reset.html.haml +3 -0
- data/lib/generators/jinda_engine/templates/app/views/user_mailer/password_reset.text.erb +3 -0
- data/lib/generators/jinda_engine/templates/app/views/user_mailer/password_reset.text.haml +3 -0
- data/lib/generators/jinda_engine/templates/app/views/users/index.haml +13 -0
- data/lib/generators/jinda_engine/templates/app/views/users/pwd/enter.html.erb +6 -0
- data/lib/generators/jinda_engine/templates/app/views/users/user/enter_user.html.erb +8 -0
- data/lib/generators/jinda_engine/templates/config/cloudinary.yml +9 -0
- data/lib/generators/jinda_engine/templates/db/seeds.rb +6 -0
- data/lib/generators/jinda_engine/templates/dot/dot.env +2 -0
- data/lib/generators/jinda_engine/templates/dotrspec +3 -0
- data/lib/generators/jinda_engine/templates/jinda.yml +10 -0
- data/lib/generators/jinda_engine/templates/public/404.html +67 -0
- data/lib/generators/jinda_engine/templates/public/422.html +67 -0
- data/lib/generators/jinda_engine/templates/public/500.html +66 -0
- data/lib/generators/jinda_engine/templates/public/assets/images/logo.png +0 -0
- data/lib/generators/jinda_engine/templates/public/favicon.ico +0 -0
- data/lib/generators/jinda_engine/templates/public/robots.txt +3 -0
- data/lib/generators/jinda_engine/templates/spec/controllers/api/v1_get_index_spec.rb +23 -0
- data/lib/generators/jinda_engine/templates/spec/controllers/api/v1_get_my_spec.rb +14 -0
- data/lib/generators/jinda_engine/templates/spec/controllers/api/v1_post_spec.rb +19 -0
- data/lib/generators/jinda_engine/templates/spec/controllers/sessions_controller_spec.rb +96 -0
- data/lib/generators/jinda_engine/templates/spec/features/userlogins_spec.rb +23 -0
- data/lib/generators/jinda_engine/templates/spec/mailers/note_spec.rb +24 -0
- data/lib/generators/jinda_engine/templates/spec/mailers/previews/note_preview.rb +9 -0
- data/lib/generators/jinda_engine/templates/spec/models/note_spec.rb +41 -0
- data/lib/generators/jinda_engine/templates/spec/models/user_spec.rb +12 -0
- data/lib/generators/jinda_engine/templates/spec/rails_helper.rb +44 -0
- data/lib/generators/jinda_engine/templates/spec/spec_helper.rb +77 -0
- data/lib/generators/jinda_engine/templates/spec/support/authentication_helper.rb +20 -0
- data/lib/generators/jinda_engine/templates/spec/support/factory_bot.rb +12 -0
- data/lib/generators/jinda_engine/templates/spec/support/omniauth_macros.rb +38 -0
- data/lib/generators/jinda_engine/templates/spec/support/request_spec_helper.rb +8 -0
- data/lib/generators/jinda_engine/templates/spec/views/articles/_article.html.erb_spec.rbx +14 -0
- data/lib/generators/jinda_engine/templates/test/application_system_test_case.rb +5 -0
- data/lib/generators/jinda_engine/templates/test/integration/jinda_routes_test.rb +42 -0
- data/lib/generators/jinda_engine/templates/test/test_helper.rb +6 -0
- data/lib/jinda_engine.rb +7 -0
- data/lib/jinda_engine/engine.rb +6 -0
- data/lib/jinda_engine/gemhelpers.rb +50 -0
- data/lib/jinda_engine/helpers.rb +1005 -0
- data/lib/jinda_engine/version.rb +3 -0
- data/lib/tasks/jinda_engine.rake +33 -0
- metadata +1203 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8c037e222b5f3a3c7e8cb25ba68a90fe6f60d64ca50fbe431796148f25ef54e9
|
4
|
+
data.tar.gz: 65532c8a691e825c5a6b8ab6442546be073b0ba0459465ce265bb7abfd63c4b8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 444c04e1ba891e10a9433cf0f4f2acf94e0146721dff162cfa127511253d949638fe95e1098c8b3dbc142a447b292fc0e1262f3494704799ed7839e559107121
|
7
|
+
data.tar.gz: 34988959e582f52900f7b074aaaf4f8aa30c0c836043604970d7674c4d58a7ff3b7d8e7bc5fe69d4388caecff28da7794f386d54718a76555d094f3f35914e3f
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
# Jinda
|
2
|
+
Rails Application Generator using Freemind
|
3
|
+
|
4
|
+
* [jinda](https://github.com/kul1/jinda)
|
5
|
+
- ![jinda-screen](https://user-images.githubusercontent.com/3953832/41832753-0143339a-7813-11e8-9ef9-c1601443c604.png)
|
6
|
+
|
7
|
+
## Additional Extension themes also available at
|
8
|
+
* [jinda_adminlte](https://github.com/kul1/jinda_adminlte)
|
9
|
+
- ![j18-screen](https://user-images.githubusercontent.com/3953832/34298172-faa7e962-e6e1-11e7-93e2-19dfd4ab42af.png)
|
10
|
+
|
11
|
+
* [jinda_adminbsb](https://github.com/kul1/jinda_adminbsb)
|
12
|
+
- ![jinda-bsb](https://user-images.githubusercontent.com/3953832/34320779-bb0980d2-e7c6-11e7-855c-fafc23487ba5.png)
|
13
|
+
|
14
|
+
## Prerequisites
|
15
|
+
|
16
|
+
These versions works for sure but others may do.
|
17
|
+
|
18
|
+
* Ruby 2.7.0
|
19
|
+
* Rails 6.0.2
|
20
|
+
* MongoDB 6
|
21
|
+
* Freemind 1.0.1
|
22
|
+
|
23
|
+
## Convention
|
24
|
+
|
25
|
+
* database is MongoDB
|
26
|
+
* images stored in upload directory, unset IMAGE_LOCATION in `initializer/jinda.rb` to use Cloudinary
|
27
|
+
* mail use Gmail SMTP, config in `config/application.rb`
|
28
|
+
* authentication use omniauth-identity
|
29
|
+
|
30
|
+
## Sample Application
|
31
|
+
|
32
|
+
Supposed we want to create ecommerce web site, first create a Rails
|
33
|
+
app without ActiveRecord
|
34
|
+
|
35
|
+
$ rails new YOURAPP -BOTJ
|
36
|
+
|
37
|
+
## Add jinda to your Gemfile:
|
38
|
+
|
39
|
+
gem 'jinda', '~> 0.5.3'
|
40
|
+
|
41
|
+
For Development (most updated)
|
42
|
+
|
43
|
+
gem 'jinda', github:'kul1/jinda'
|
44
|
+
|
45
|
+
depend on your operating system, you may need to uncomment
|
46
|
+
|
47
|
+
gem 'therubyracer', :platforms => :ruby
|
48
|
+
|
49
|
+
install gems
|
50
|
+
|
51
|
+
$ bundle
|
52
|
+
|
53
|
+
generate jinda application
|
54
|
+
|
55
|
+
$ rails generate jinda:install
|
56
|
+
|
57
|
+
Then run bundle again to install additional gems added by jinda
|
58
|
+
|
59
|
+
$ bundle
|
60
|
+
|
61
|
+
(or run all with "sh install.sh" )
|
62
|
+
|
63
|
+
configure mongoid, omniauth
|
64
|
+
|
65
|
+
$ rails generate jinda:config
|
66
|
+
|
67
|
+
Please make sure mongod is running then create admin user
|
68
|
+
|
69
|
+
$ rails jinda:seed
|
70
|
+
|
71
|
+
now the application is ready, start it as any Rails application
|
72
|
+
|
73
|
+
$ rails server
|
74
|
+
|
75
|
+
go to http://localhost:3000, click *Sign In* on the left menu, and enter user name `admin` and password `secret`
|
76
|
+
|
77
|
+
![login](https://user-images.githubusercontent.com/3953832/41832924-d868f8f0-7813-11e8-93bb-19c0357cf604.png)
|
78
|
+
|
79
|
+
Now open file `app/jinda/index.mm` using Freemind
|
80
|
+
|
81
|
+
![index mm](https://user-images.githubusercontent.com/3953832/34680350-7906fbe8-f45e-11e7-8df5-969b4c735c6e.png)
|
82
|
+
|
83
|
+
The 3 main branches are
|
84
|
+
|
85
|
+
* models - this defines all the models to use in the application
|
86
|
+
* services - this defines services which will be come the menu on the left of the screen. There will be 2 levels; the first sub branch is the main menu (modules) and the second sub branch is the sub menu (services)
|
87
|
+
* roles - this defines role for all users
|
88
|
+
|
89
|
+
### models
|
90
|
+
|
91
|
+
Fiirst, we need to create some product so we click on models we'll see 2 models person and address. These are sample only. You can delete them or modify them however you want. We'll take a look at them first
|
92
|
+
|
93
|
+
![models](https://user-images.githubusercontent.com/3953832/34681380-50b27dd6-f461-11e7-8472-3a14d76e0f16.png)
|
94
|
+
|
95
|
+
The first sub branch (e.g. person) is the model name. According to Rails convention, this should be a singular word. The next sub branch are columns in the database. Let's take a look at each:
|
96
|
+
|
97
|
+
* `fname` - this create a column (field) called fname which is a String by default
|
98
|
+
* `sex: integer` - this create a column called sex, it is integer so must be explicity defined. The next sub branch (1: male) is disregarded by Jinda so we can put whatever we want. Here I just put some reminder.
|
99
|
+
* `belongs_to :address` - here we have ![pen](https://cloud.githubusercontent.com/assets/3953832/25600038/3a4ffb66-2f0b-11e7-9f03-b875e550eefe.png)
|
100
|
+
icon. this means whatever text on this line will be added as is to the model Jinda generates. You use this to specify anything you want such as association, index, remarks in code, etc. according to mongoid gem. To draw the icon, rest mouse on the branch and hit <Alt-I>.
|
101
|
+
* `dob: date` - use any type that mongoid provides.
|
102
|
+
* `photo` - for file field, just use String here. Jinda will receive the binary file and store in file system or cloudinary then generate a url link to it.
|
103
|
+
|
104
|
+
In this example we just want a product model, so delete the person and address model and add a product branch like so
|
105
|
+
|
106
|
+
![freemind1](https://user-images.githubusercontent.com/3953832/34680349-78f1eea6-f45e-11e7-8e43-50d9025bb449.png)
|
107
|
+
|
108
|
+
Save the mind map then run:
|
109
|
+
|
110
|
+
rake jinda:update
|
111
|
+
|
112
|
+
This will create file `app/models/product.rb`. In this file, note the comment lines `# jinda begin` and ` # jinda end`. Everything inside these comments will get overwritten when you change the models branch in the mind map so if you need to put anything inside here, use the mind map instead. You can add anything outside these comment lines which will be preserved when doing jinda:update.
|
113
|
+
|
114
|
+
### services
|
115
|
+
|
116
|
+
Next we'll add some product into the database, we'll first take a look at the services branch, which already has 3 sub branches; users, admins, and devs. Unlike models person and address branches, these branches are actively used by the system so I recommend that you leave them alone. Let's open the users branch
|
117
|
+
|
118
|
+
![image](https://cloud.githubusercontent.com/assets/3953832/25599895/ecf46466-2f09-11e7-82aa-81ade6b9cd83.png)
|
119
|
+
|
120
|
+
The text `users:User` on the sub branch has these implications:
|
121
|
+
|
122
|
+
* `users` correspond to `app/controllers/users_controller.rb` which already exist when you do rails generate jinda:install. New branch will create new controller if not exist. In Jinda term, this will be called module.
|
123
|
+
* `User` will create entry in main menu on the left of the screen. You don't see it in the screenshot above because it's controlled by the sub branch `role:m` which means this menu only available for login member. If you already signed in as admin, you should see it now.
|
124
|
+
|
125
|
+
The next sub branches has the following:
|
126
|
+
|
127
|
+
* `role: m` - means that this module (menu) is available only to user who has role m (if you open the role branch now will see that role m is member). All registered user has role m by default. User who is not log on would not be able to access this module.
|
128
|
+
* `link:info: /users` - means that this is a link, the format is link: *submenu label* : *url* where submenu label is the text to show in the submenu and url is the link to go to, in this case, it woud go to http://localhost:3000/users which will perform index action of UsersController.
|
129
|
+
* `user:edit` the branch that do not start with role:, rule:, nor link: will be a Jinda service. You will then specify the sequence of the execution as in this example there are 3 sub branches - enter_user, update_user, and rule:login? Let's take a look at them:
|
130
|
+
|
131
|
+
* `enter_user:edit` - the first step is to display a form to input user information, this is accompanied by icon ![image](https://cloud.githubusercontent.com/assets/3953832/25599946/47c32cf6-2f0a-11e7-80a8-2c02c6294c9a.png)
|
132
|
+
which means user interface screen. and will correspond to a view file `app/views/users/user/enter_user.html.erb` where `/users` comes from the module name (the sub branch of services), `/user` comes from the service name (the sub branch of users), and `enter_user.html.erb` comes from the first part of this branch. The `edit` after the colon is just a description of this step. This branch also has sub branch `rule:login? && own_xmain?` which specify rule for this step that the user must be login and can continue this task if he is the one who started it. *task* in here means each instance of service.
|
133
|
+
* `update_user` - this icon ![image](https://cloud.githubusercontent.com/assets/3953832/25599976/87b69ad2-2f0a-11e7-9aba-1bd4e9546d3e.png) means to execute method update_user within `users_controller.rb`
|
134
|
+
|
135
|
+
Armed with this knowledge, we are ready to add new product into our application like so:
|
136
|
+
|
137
|
+
![add_enter](https://cloud.githubusercontent.com/assets/3953832/25600158/582d1fbe-2f0c-11e7-9bde-01a195a45b6c.png)
|
138
|
+
|
139
|
+
|
140
|
+
To generate controller and views we save this mind map and run
|
141
|
+
|
142
|
+
rake jinda:update
|
143
|
+
|
144
|
+
open file `app/views/products/add/enter.html.erb` you'll see some sample view already in there but commented. edit the file so it look like this
|
145
|
+
|
146
|
+
|
147
|
+
![product_enter](https://cloud.githubusercontent.com/assets/3953832/25600363/e5cc8282-2f0d-11e7-81f7-273c9bdc1a63.png)
|
148
|
+
|
149
|
+
|
150
|
+
Note that we do not specify form_tag and submit_tag, these will be supplied by Jinda.
|
151
|
+
|
152
|
+
then open file `app/controllers/products_controller.rb` and add `create` method as follow. The method name has to be correspond to the ![bookmark](http://songrit.googlecode.com/files/bookmark.png) branch.
|
153
|
+
|
154
|
+
![products_controller](http://songrit.googlecode.com/files/products_controller.png)
|
155
|
+
|
156
|
+
## Testing
|
157
|
+
|
158
|
+
run following command:
|
159
|
+
|
160
|
+
rails generate jinda:rspec
|
161
|
+
guard init
|
162
|
+
guard
|
163
|
+
|
164
|
+
![rspec](https://user-images.githubusercontent.com/3953832/34680352-7931d426-f45e-11e7-9f40-8b85b94c61bf.png)
|
165
|
+
|
166
|
+
|
167
|
+
## Contributing
|
168
|
+
|
169
|
+
1. Fork it
|
170
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
171
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
172
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
173
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'Jinda_engine'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.md')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
|
18
|
+
load 'rails/tasks/engine.rake'
|
19
|
+
|
20
|
+
load 'rails/tasks/statistics.rake'
|
21
|
+
|
22
|
+
require 'bundler/gem_tasks'
|
23
|
+
|
24
|
+
require 'rake/testtask'
|
25
|
+
|
26
|
+
Rake::TestTask.new(:test) do |t|
|
27
|
+
t.libs << 'test'
|
28
|
+
t.pattern = 'test/**/*_test.rb'
|
29
|
+
t.verbose = false
|
30
|
+
end
|
31
|
+
|
32
|
+
task default: :test
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
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 jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require jquery.mobile.splitview
|
16
|
+
//= require jquery.mobile-1.2.1
|
17
|
+
//= require jquery.mobile.datebox
|
18
|
+
//= require iscroll-wrapper
|
19
|
+
//= require iscroll
|
20
|
+
//= require jinda
|
21
|
+
// require turbolinks
|
22
|
+
// require disable_enter_key.js
|
23
|
+
|
24
|
+
|
@@ -0,0 +1,27 @@
|
|
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 jquery
|
14
|
+
//= require jquery.turbolinks
|
15
|
+
//= require jquery_ujs
|
16
|
+
//= require jqm/jquery.mobile.splitview
|
17
|
+
//= require jqm/jquery.mobile-1.2.1
|
18
|
+
//= require jqm/jquery.mobile.datebox
|
19
|
+
//= require jqm/iscroll-wrapper
|
20
|
+
//= require jqm/iscroll
|
21
|
+
//= require jqm/jinda
|
22
|
+
//= require turbolinks
|
23
|
+
//= require jqm/disable_enter_key.js
|
24
|
+
//= require disable_enter_key.js
|
25
|
+
//= require notes.js
|
26
|
+
|
27
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Action Cable provides the framework to deal with WebSockets in Rails.
|
2
|
+
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
|
3
|
+
//
|
4
|
+
//= require action_cable
|
5
|
+
//= require_self
|
6
|
+
//= require_tree ./channels
|
7
|
+
|
8
|
+
(function() {
|
9
|
+
this.App || (this.App = {});
|
10
|
+
|
11
|
+
App.cable = ActionCable.createConsumer();
|
12
|
+
|
13
|
+
}).call(this);
|
@@ -0,0 +1,10 @@
|
|
1
|
+
$(function() {
|
2
|
+
$("input").keypress(function (evt) {
|
3
|
+
//Deterime where our character code is coming from within the event
|
4
|
+
var charCode = evt.charCode || evt.keyCode;
|
5
|
+
if (charCode == 13) { //Enter key's keycode
|
6
|
+
alert("Please click the button");
|
7
|
+
return false;
|
8
|
+
}
|
9
|
+
});
|
10
|
+
})
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/*
|
2
|
+
* iscroll-wrapper for jQquery.
|
3
|
+
* http://sanraul.com/projects/jqloader/
|
4
|
+
*
|
5
|
+
* Copyright (c) 2011 Raul Sanchez (http://www.sanraul.com)
|
6
|
+
*
|
7
|
+
* Dual licensed under the MIT and GPL licenses:
|
8
|
+
* http://www.opensource.org/licenses/mit-license.php
|
9
|
+
* http://www.gnu.org/licenses/gpl.html
|
10
|
+
*/
|
11
|
+
|
12
|
+
(function($){
|
13
|
+
$.fn.iscroll = function(options){
|
14
|
+
if(this.data('iScrollReady') == null){
|
15
|
+
var that = this;
|
16
|
+
var options = $.extend({}, options);
|
17
|
+
options.onScrollEnd = function(){
|
18
|
+
that.triggerHandler('onScrollEnd', [this]);
|
19
|
+
};
|
20
|
+
arguments.callee.object = new iScroll(this.get(0), options);
|
21
|
+
// NOTE: for some reason in a complex page the plugin does not register
|
22
|
+
// the size of the element. This will fix that in the meantime.
|
23
|
+
setTimeout(function(scroller){
|
24
|
+
scroller.refresh();
|
25
|
+
}, 1000, arguments.callee.object);
|
26
|
+
this.data('iScrollReady', true);
|
27
|
+
}else{
|
28
|
+
arguments.callee.object.refresh();
|
29
|
+
}
|
30
|
+
return arguments.callee.object;
|
31
|
+
};
|
32
|
+
})(jQuery);
|