redde 0.1.18 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +19 -0
- data/.travis.yml +5 -4
- data/Gemfile +8 -5
- data/MIT-LICENSE +20 -0
- data/README.md +96 -105
- data/Rakefile +20 -1
- data/app/assets/fonts/redde-admin.eot +0 -0
- data/app/assets/fonts/redde-admin.svg +12 -0
- data/app/assets/fonts/redde-admin.ttf +0 -0
- data/app/assets/fonts/redde-admin.woff +0 -0
- data/app/assets/images/redde/close-hover.svg +4 -0
- data/app/assets/images/redde/close.svg +6 -0
- data/app/assets/images/redde/enter.svg +4 -0
- data/app/assets/images/redde/eye.svg +5 -0
- data/app/assets/images/redde/eye_disactive.svg +5 -0
- data/app/assets/images/redde/main-menu/cog.svg +8 -0
- data/app/assets/images/redde/main-menu/cog_active.svg +8 -0
- data/app/assets/images/redde/main-menu/folder.svg +4 -0
- data/app/assets/images/redde/main-menu/folder_active.svg +4 -0
- data/app/assets/images/redde/main-menu/home.svg +4 -0
- data/app/assets/images/redde/main-menu/home_active.svg +4 -0
- data/app/assets/images/redde/main-menu/list.svg +4 -0
- data/app/assets/images/redde/main-menu/list_active.svg +4 -0
- data/app/assets/images/redde/next.svg +7 -0
- data/app/assets/images/redde/plus.svg +3 -0
- data/app/assets/images/redde/sel.svg +6 -0
- data/app/assets/images/redde/user.svg +12 -0
- data/app/assets/javascripts/redde/fileapi.js.coffee +17 -0
- data/app/assets/javascripts/redde/index.js.coffee +12 -0
- data/app/assets/javascripts/redde/redactor/index.coffee +8 -0
- data/{lib/generators/redde/layout/templates/assets/redactor/javascripts/jquery-migrate-1.2.1.js → app/assets/javascripts/redde/redactor/jquery-migrate-1.3.0.js} +215 -34
- data/{lib/generators/redde/layout/templates/assets/redactor/javascripts → app/assets/javascripts/redde}/redactor/redactor.js.erb +250 -250
- data/app/assets/javascripts/redde/sortTree/index.js.coffee +47 -0
- data/app/assets/javascripts/redde/sortable.coffee +47 -0
- data/{spec/dummy/app/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/error-msg.sass +4 -2
- data/app/assets/stylesheets/redde/blocks/flash-msg.sass +22 -0
- data/app/assets/stylesheets/redde/blocks/list-v2.sass +96 -0
- data/app/assets/stylesheets/redde/blocks/photos-uploader.sass +21 -0
- data/app/assets/stylesheets/redde/blocks/photos.sass +56 -0
- data/app/assets/stylesheets/redde/blocks/redde-form.sass +55 -0
- data/app/assets/stylesheets/redde/blocks/sort-tree.sass +46 -0
- data/app/assets/stylesheets/redde/defaults/btn.sass +30 -0
- data/app/assets/stylesheets/redde/defaults/del.sass +23 -0
- data/app/assets/stylesheets/redde/defaults/index.sass +87 -0
- data/app/assets/stylesheets/redde/defaults/inp.sass +20 -0
- data/app/assets/stylesheets/redde/defaults/reset.sass +25 -0
- data/app/assets/stylesheets/redde/defaults/sbm.sass +32 -0
- data/app/assets/stylesheets/redde/defaults/sel.sass +29 -0
- data/app/assets/stylesheets/redde/fonts.sass +42 -0
- data/app/assets/stylesheets/redde/index.scss +5 -0
- data/app/assets/stylesheets/redde/layouts/header.sass +63 -0
- data/app/assets/stylesheets/redde/layouts/main-menu.sass +63 -0
- data/app/assets/stylesheets/redde/layouts/main.sass +48 -0
- data/app/assets/stylesheets/redde/layouts/page-header.sass +34 -0
- data/app/assets/stylesheets/redde/layouts/page-sidebar.sass +9 -0
- data/app/assets/stylesheets/redde/mixins.sass +10 -0
- data/{spec/dummy/app/assets/stylesheets → app/assets/stylesheets/redde}/redactor/index.scss +46 -49
- data/app/assets/stylesheets/redde-admin/blocks/list-v2.sass +96 -0
- data/app/assets/stylesheets/redde-admin/defaults/del.sass +23 -0
- data/app/controllers/admin/base_controller.rb +81 -0
- data/{lib/generators/redde/layout/templates/controllers → app/controllers/admin}/managers_controller.rb +10 -6
- data/app/controllers/admin/redde_photos_controller.rb +31 -0
- data/app/controllers/admin/system_commands_controller.rb +11 -0
- data/app/form_builders/redde_form_builder.rb +106 -0
- data/app/helpers/redde/admin_helper.rb +33 -0
- data/app/helpers/redde/form_helper.rb +59 -0
- data/app/helpers/redde/index_helper.rb +61 -0
- data/{lib/redde/concerns/layout.rb → app/models/concerns/redde/layouts.rb} +1 -1
- data/app/models/concerns/redde/photoable.rb +5 -0
- data/{lib/redde/concerns → app/models/concerns/redde}/sluggable.rb +6 -3
- data/app/models/concerns/redde/tree_sortable.rb +40 -0
- data/{lib/redde/concerns → app/models/concerns/redde}/with_photo.rb +5 -5
- data/app/models/redde/photo.rb +16 -0
- data/app/models/redde/system_command.rb +43 -0
- data/{lib → app/models}/redde/url_generator.rb +7 -3
- data/{lib/generators/redde/photo/templates/uploader.rb → app/uploaders/photo_uploader.rb} +4 -4
- data/app/views/admin/base/_tree_item.html.haml +10 -0
- data/app/views/admin/base/edit.html.haml +21 -0
- data/app/views/admin/base/index.html.haml +68 -0
- data/app/views/admin/base/tree.html.haml +14 -0
- data/app/views/admin/managers/edit.html.haml +11 -0
- data/app/views/admin/managers/index.html.haml +17 -0
- data/{lib/generators/redde/layout/templates/base → app/views/admin/redde}/_header.html.haml +5 -6
- data/app/views/admin/redde/_main_menu.html.haml +12 -0
- data/app/views/admin/redde/_page_header.html.haml +3 -0
- data/app/views/admin/redde/_sidebar.html.haml +16 -0
- data/{lib/generators/redde/layout/templates/base → app/views/admin/redde}/_validate.haml +2 -2
- data/app/views/admin/redde_photos/_photo.haml +11 -0
- data/app/views/admin/redde_photos/_photos.haml +28 -0
- data/app/views/admin/system_commands/index.html.haml +25 -0
- data/app/views/kaminari/redde/_first_page.html.haml +9 -0
- data/app/views/kaminari/redde/_gap.html.haml +8 -0
- data/app/views/kaminari/redde/_last_page.html.haml +9 -0
- data/app/views/kaminari/redde/_next_page.html.haml +9 -0
- data/app/views/kaminari/redde/_page.html.haml +10 -0
- data/app/views/kaminari/redde/_paginator.html.haml +18 -0
- data/app/views/kaminari/redde/_prev_page.html.haml +9 -0
- data/{lib/generators/redde/layout/templates → app/views}/layouts/admin.html.haml +28 -29
- data/{lib/generators/redde/layout/templates → app/views}/layouts/login.html.haml +32 -32
- data/bin/rails +12 -0
- data/config/locales/paginate.ru.yml +9 -0
- data/config/routes.rb +8 -0
- data/db/migrate/20160121152706_create_redde_photos.rb +16 -0
- data/lib/generators/redde/layout/layout_generator.rb +3 -26
- data/lib/generators/redde/layout/templates/assets/javascripts/admin.js +1 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin.css +15 -0
- data/lib/generators/redde/scaffold/scaffold_generator.rb +45 -8
- data/lib/generators/redde/scaffold/templates/controllers/controller.rb +2 -45
- data/lib/generators/redde/scaffold/templates/edit.html.haml +4 -9
- data/lib/generators/redde/scaffold/templates/index.html.haml +2 -6
- data/lib/generators/redde/scaffold/templates/ru.yml +14 -0
- data/lib/redde/engine.rb +16 -0
- data/lib/redde/version.rb +1 -1
- data/lib/redde.rb +20 -4
- data/lib/tasks/redde_tasks.rake +4 -0
- data/redde.gemspec +44 -22
- metadata +482 -455
- data/Guardfile +0 -24
- data/LICIENSE.md +0 -21
- data/lib/generators/redde/layout/templates/assets/images/admin/del.png +0 -0
- data/lib/generators/redde/layout/templates/assets/images/admin/folder_.png +0 -0
- data/lib/generators/redde/layout/templates/assets/javascripts/admin/index.js +0 -20
- data/lib/generators/redde/layout/templates/assets/redactor/javascripts/redactor/index.coffee +0 -4
- data/lib/generators/redde/layout/templates/assets/redactor/stylesheets/redactor/index.scss +0 -369
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/error-msg.sass +0 -47
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/notice.scss +0 -39
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/photos.scss +0 -31
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/sortable.sass +0 -44
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/custom/index.scss +0 -1
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/index.scss +0 -131
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/input.sass +0 -35
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/reset.sass +0 -33
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/table.scss +0 -24
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/index.scss +0 -6
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/header.sass +0 -50
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/launchbar.sass +0 -23
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/main.sass +0 -38
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/page-header.sass +0 -22
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/page-sidebar.sass +0 -24
- data/lib/generators/redde/layout/templates/base/_launchbar.html.haml +0 -11
- data/lib/generators/redde/layout/templates/base/_sidebar.html.haml +0 -14
- data/lib/generators/redde/layout/templates/controllers/base_controller.rb +0 -28
- data/lib/generators/redde/layout/templates/form_builders/redde_form_builder.rb +0 -63
- data/lib/generators/redde/layout/templates/helpers/admin_helper.rb +0 -94
- data/lib/generators/redde/photo/photo_generator.rb +0 -35
- data/lib/generators/redde/photo/templates/controller.rb +0 -20
- data/lib/generators/redde/photo/templates/create_photos.rb +0 -16
- data/lib/generators/redde/photo/templates/photo.rb +0 -4
- data/lib/generators/redde/photo/templates/photos/_photo.haml +0 -5
- data/lib/generators/redde/photo/templates/photos/_photos.haml +0 -19
- data/lib/generators/redde/photo/templates/photos/create.js.erb +0 -1
- data/lib/redde/concerns/photoable.rb +0 -17
- data/spec/dummy/.rspec +0 -1
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/images/admin/addphoto.png +0 -0
- data/spec/dummy/app/assets/images/admin/ajaxloader2.gif +0 -0
- data/spec/dummy/app/assets/images/admin/arrow_down.png +0 -0
- data/spec/dummy/app/assets/images/admin/arrow_enter.png +0 -0
- data/spec/dummy/app/assets/images/admin/arrow_right.png +0 -0
- data/spec/dummy/app/assets/images/admin/coins.png +0 -0
- data/spec/dummy/app/assets/images/admin/confirm.png +0 -0
- data/spec/dummy/app/assets/images/admin/del.png +0 -0
- data/spec/dummy/app/assets/images/admin/delete.png +0 -0
- data/spec/dummy/app/assets/images/admin/email.png +0 -0
- data/spec/dummy/app/assets/images/admin/error-label-triangle.png +0 -0
- data/spec/dummy/app/assets/images/admin/error.png +0 -0
- data/spec/dummy/app/assets/images/admin/favicon.png +0 -0
- data/spec/dummy/app/assets/images/admin/fio.png +0 -0
- data/spec/dummy/app/assets/images/admin/folder.png +0 -0
- data/spec/dummy/app/assets/images/admin/folder_.png +0 -0
- data/spec/dummy/app/assets/images/admin/icon_eye.gif +0 -0
- data/spec/dummy/app/assets/images/admin/lightbox/css/jquery.lightbox-0.5.css +0 -101
- data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-blank.gif +0 -0
- data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-btn-close.gif +0 -0
- data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-btn-next.gif +0 -0
- data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-btn-prev.gif +0 -0
- data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-ico-loading.gif +0 -0
- data/spec/dummy/app/assets/images/admin/lightbox/js/jquery.js +0 -32
- data/spec/dummy/app/assets/images/admin/lightbox/js/jquery.lightbox-0.5.js +0 -477
- data/spec/dummy/app/assets/images/admin/lightbox/js/jquery.lightbox-0.5.min.js +0 -42
- data/spec/dummy/app/assets/images/admin/lightbox/js/jquery.lightbox-0.5.pack.js +0 -14
- data/spec/dummy/app/assets/images/admin/logo.png +0 -0
- data/spec/dummy/app/assets/images/admin/logo_reddeshop.png +0 -0
- data/spec/dummy/app/assets/images/admin/move_handler.png +0 -0
- data/spec/dummy/app/assets/images/admin/phone.png +0 -0
- data/spec/dummy/app/assets/images/admin/photo_ico.png +0 -0
- data/spec/dummy/app/assets/images/admin/print.png +0 -0
- data/spec/dummy/app/assets/images/admin/refresh.png +0 -0
- data/spec/dummy/app/assets/images/admin/submit.png +0 -0
- data/spec/dummy/app/assets/images/admin/submit_hover.png +0 -0
- data/spec/dummy/app/assets/images/admin/view.png +0 -0
- data/spec/dummy/app/assets/images/admin/view_mk.png +0 -0
- data/spec/dummy/app/assets/images/redactor/icons.png +0 -0
- data/spec/dummy/app/assets/images/redactor/plugins/file.html +0 -3
- data/spec/dummy/app/assets/images/redactor/plugins/image.html +0 -39
- data/spec/dummy/app/assets/images/redactor/plugins/image_edit.html +0 -35
- data/spec/dummy/app/assets/images/redactor/plugins/link.html +0 -74
- data/spec/dummy/app/assets/images/redactor/plugins/table.html +0 -25
- data/spec/dummy/app/assets/images/redactor/plugins/video.html +0 -15
- data/spec/dummy/app/assets/javascripts/admin/jquery.mjs.nestedSortable.js +0 -429
- data/spec/dummy/app/assets/javascripts/admin.js +0 -21
- data/spec/dummy/app/assets/javascripts/application.js +0 -14
- data/spec/dummy/app/assets/javascripts/jquery-migrate-1.2.1.js +0 -521
- data/spec/dummy/app/assets/javascripts/redactor/langs/en.js +0 -76
- data/spec/dummy/app/assets/javascripts/redactor/langs/ru.js +0 -75
- data/spec/dummy/app/assets/javascripts/redactor/redactor.js.erb +0 -2248
- data/spec/dummy/app/assets/javascripts/redactor/toolbars/default.js +0 -219
- data/spec/dummy/app/assets/stylesheets/admin/blocks/list.scss +0 -22
- data/spec/dummy/app/assets/stylesheets/admin/blocks/notice.scss +0 -39
- data/spec/dummy/app/assets/stylesheets/admin/blocks/orders.scss +0 -22
- data/spec/dummy/app/assets/stylesheets/admin/blocks/paginate.sass +0 -28
- data/spec/dummy/app/assets/stylesheets/admin/blocks/pagination.scss +0 -28
- data/spec/dummy/app/assets/stylesheets/admin/blocks/partners.scss +0 -15
- data/spec/dummy/app/assets/stylesheets/admin/blocks/phead-tabs.sass +0 -27
- data/spec/dummy/app/assets/stylesheets/admin/blocks/photos.scss +0 -31
- data/spec/dummy/app/assets/stylesheets/admin/blocks/sortable.sass +0 -44
- data/spec/dummy/app/assets/stylesheets/admin/custom/index.scss +0 -1
- data/spec/dummy/app/assets/stylesheets/admin/defaults/index.scss +0 -131
- data/spec/dummy/app/assets/stylesheets/admin/defaults/input.sass +0 -35
- data/spec/dummy/app/assets/stylesheets/admin/defaults/reset.sass +0 -33
- data/spec/dummy/app/assets/stylesheets/admin/defaults/table.scss +0 -24
- data/spec/dummy/app/assets/stylesheets/admin/index.scss +0 -6
- data/spec/dummy/app/assets/stylesheets/admin/layouts/header.sass +0 -50
- data/spec/dummy/app/assets/stylesheets/admin/layouts/launchbar.sass +0 -23
- data/spec/dummy/app/assets/stylesheets/admin/layouts/login.sass +0 -25
- data/spec/dummy/app/assets/stylesheets/admin/layouts/main.sass +0 -38
- data/spec/dummy/app/assets/stylesheets/admin/layouts/page-header.sass +0 -22
- data/spec/dummy/app/assets/stylesheets/admin/layouts/page-sidebar.sass +0 -24
- data/spec/dummy/app/assets/stylesheets/admin/layouts/sidebar.sass +0 -30
- data/spec/dummy/app/assets/stylesheets/admin/shop/_filter.scss +0 -16
- data/spec/dummy/app/assets/stylesheets/admin/shop/_order-sh.scss +0 -59
- data/spec/dummy/app/assets/stylesheets/admin/shop/_pe.scss +0 -43
- data/spec/dummy/app/assets/stylesheets/redactor/wym.css +0 -136
- data/spec/dummy/app/controllers/admin/base_controller.rb +0 -28
- data/spec/dummy/app/controllers/admin/managers_controller.rb +0 -36
- data/spec/dummy/app/controllers/application_controller.rb +0 -6
- data/spec/dummy/app/controllers/articles_controller.rb +0 -8
- data/spec/dummy/app/controllers/managers/registrations_controller.rb +0 -21
- data/spec/dummy/app/helpers/admin_helper.rb +0 -94
- data/spec/dummy/app/models/article.rb +0 -4
- data/spec/dummy/app/models/article_category.rb +0 -2
- data/spec/dummy/app/models/photo.rb +0 -3
- data/spec/dummy/app/views/admin/base/_header.html.haml +0 -12
- data/spec/dummy/app/views/admin/base/_launchbar.html.haml +0 -11
- data/spec/dummy/app/views/admin/base/_sidebar.html.haml +0 -14
- data/spec/dummy/app/views/admin/base/_validate.haml +0 -8
- data/spec/dummy/app/views/admin/base/welcome.haml +0 -2
- data/spec/dummy/app/views/admin/photos/_photo.haml +0 -5
- data/spec/dummy/app/views/admin/photos/_photos.haml +0 -19
- data/spec/dummy/app/views/admin/photos/create.js.erb +0 -1
- data/spec/dummy/app/views/admin/photos/destroy.js.erb +0 -1
- data/spec/dummy/app/views/articles/show.html.haml +0 -2
- data/spec/dummy/app/views/layouts/admin.html.haml +0 -29
- data/spec/dummy/app/views/layouts/application.html.erb +0 -15
- data/spec/dummy/app/views/layouts/login.html.haml +0 -32
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/config/application.rb +0 -33
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -29
- data/spec/dummy/config/environments/production.rb +0 -80
- data/spec/dummy/config/environments/test.rb +0 -36
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -12
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -36
- data/spec/dummy/config/routes.rb +0 -4
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/migrate/20130908123351_create_articles.rb +0 -9
- data/spec/dummy/db/migrate/20140128152208_create_article_categories.rb +0 -11
- data/spec/dummy/db/migrate/20140607122532_create_photos.rb +0 -16
- data/spec/dummy/db/schema.rb +0 -98
- data/spec/dummy/public/404.html +0 -58
- data/spec/dummy/public/422.html +0 -58
- data/spec/dummy/public/500.html +0 -57
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/generators/layout_generator_spec.rb +0 -42
- data/spec/generators/photo_generator_spec.rb +0 -32
- data/spec/generators/scaffold_generator_spec.rb +0 -58
- data/spec/models/sluggable_spec.rb +0 -42
- data/spec/models/url_generator_spec.rb +0 -18
- data/spec/models/with_photo_spec.rb +0 -25
- data/spec/spec_helper.rb +0 -52
- /data/{lib/generators/redde/layout/templates/assets/redactor → app/assets}/images/.keep +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/addphoto.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/ajaxloader2.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/arrow_down.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/arrow_enter.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/arrow_right.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/coins.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/confirm.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/delete.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/email.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/error.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/favicon.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/fio.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/icon_eye.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/css/jquery.lightbox-0.5.css +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-blank.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-btn-close.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-btn-next.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-btn-prev.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-ico-loading.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/js/jquery.js +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/js/jquery.lightbox-0.5.js +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/js/jquery.lightbox-0.5.min.js +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/js/jquery.lightbox-0.5.pack.js +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/logo_reddeshop.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/phone.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/photo_ico.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/print.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/refresh.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/submit.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/submit_hover.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/view.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/view_mk.png +0 -0
- /data/{lib/generators/redde/layout/templates/assets/images/admin → app/assets/images/redde}/error-label-triangle.png +0 -0
- /data/{lib/generators/redde/layout/templates/assets/images/admin → app/assets/images/redde}/folder.png +0 -0
- /data/{lib/generators/redde/layout/templates/assets/images/admin → app/assets/images/redde}/logo.png +0 -0
- /data/{lib/generators/redde/layout/templates/assets/images/admin/move_handler.png → app/assets/images/redde/move-handler.png} +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/icons.png +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/file.html +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/image.html +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/image_edit.html +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/link.html +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/table.html +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/video.html +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/javascripts → app/assets/javascripts/redde}/redactor/langs/en.js +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/javascripts → app/assets/javascripts/redde}/redactor/langs/ru.js +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/javascripts → app/assets/javascripts/redde}/redactor/toolbars/default.js +0 -0
- /data/{lib/generators/redde/layout/templates/assets/javascripts/admin → app/assets/javascripts/redde/sortTree}/jquery.mjs.nestedSortable.js +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/list.scss +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/orders.scss +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/paginate.sass +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/pagination.scss +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/partners.scss +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/phead-tabs.sass +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/layouts/login.sass +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/layouts/sidebar.sass +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/stylesheets → app/assets/stylesheets/redde}/redactor/wym.css +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/shop/_filter.scss +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/shop/_order-sh.scss +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/shop/_pe.scss +0 -0
- /data/{spec/dummy/app/assets/images → app/controllers}/.keep +0 -0
- /data/{lib/generators/redde/layout/templates → app}/controllers/managers/registrations_controller.rb +0 -0
- /data/{spec/dummy/app/models → app/helpers}/.keep +0 -0
- /data/{spec/dummy/lib/assets → app/mailers}/.keep +0 -0
- /data/{spec/dummy/log → app/models}/.keep +0 -0
- /data/{spec/dummy/app/assets/stylesheets/application.css.scss → app/views/.keep} +0 -0
- /data/{lib/generators/redde/layout/templates → app/views/admin}/base/welcome.haml +0 -0
- /data/{lib/generators/redde/photo/templates/photos → app/views/admin/redde_photos}/destroy.js.erb +0 -0
@@ -1,35 +0,0 @@
|
|
1
|
-
|
2
|
-
<table class="redactor_ruler">
|
3
|
-
<tr>
|
4
|
-
<td nowrap>%RLANG.title%</td>
|
5
|
-
<td><input id="redactor_file_alt" style="width: 99%;" /></td>
|
6
|
-
</tr>
|
7
|
-
<tr>
|
8
|
-
<td nowrap>%RLANG.link%</td>
|
9
|
-
<td><input id="redactor_file_link" style="width: 99%;" /></td>
|
10
|
-
</tr>
|
11
|
-
<tr>
|
12
|
-
<td nowrap class="small">%RLANG.image_position%</td>
|
13
|
-
<td width="100%">
|
14
|
-
<select id="redactor_form_image_align">
|
15
|
-
<option value="none">%RLANG.none%</option>
|
16
|
-
<option value="left">%RLANG.left%</option>
|
17
|
-
<option value="right">%RLANG.right%</option>
|
18
|
-
</select>
|
19
|
-
</td>
|
20
|
-
</tr>
|
21
|
-
<tr>
|
22
|
-
<td><a href="javascript:void(null);" id="redactor_image_delete_btn" style="color: #000;">%RLANG._delete%</a></td>
|
23
|
-
<td>
|
24
|
-
|
25
|
-
<span class="redactor_btns_box">
|
26
|
-
<input type="button" name="save" id="redactorSaveBtn" value="%RLANG.save%" />
|
27
|
-
<a href="javascript:void(null);" style="color: #777; font-size: 12px;" id="redactor_btn_modal_close">%RLANG.cancel%</a>
|
28
|
-
</span>
|
29
|
-
<div style="clear: both;"></div>
|
30
|
-
|
31
|
-
</td>
|
32
|
-
</tr>
|
33
|
-
</table>
|
34
|
-
|
35
|
-
|
@@ -1,74 +0,0 @@
|
|
1
|
-
<form id="redactorInsertLinkForm" method="post" action="" enctype="multipart/form-data">
|
2
|
-
|
3
|
-
|
4
|
-
<div id="redactor_tabs">
|
5
|
-
<a href="javascript:void(null);" class="redactor_tabs_act">URL</a>
|
6
|
-
<a href="javascript:void(null);">Email</a>
|
7
|
-
<a href="javascript:void(null);">%RLANG.anchor%</a>
|
8
|
-
<a href="javascript:void(null);">%RLANG.file%</a>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<input type="hidden" id="redactor_tab_selected" value="1" />
|
12
|
-
|
13
|
-
<div class="redactor_tab" id="redactor_tab1">
|
14
|
-
<table class="redactor_ruler">
|
15
|
-
<tr>
|
16
|
-
<td nowrap>URL</td>
|
17
|
-
<td width="100%"><input id="redactor_link_url" style="width: 99%; font-size: 16px;" /></td>
|
18
|
-
</tr>
|
19
|
-
<tr>
|
20
|
-
<td>%RLANG.text%</td>
|
21
|
-
<td><input class="redactor_link_text" id="redactor_link_url_text" style="width: 99%; font-size: 16px;" /></td>
|
22
|
-
</tr>
|
23
|
-
</table>
|
24
|
-
</div>
|
25
|
-
<div class="redactor_tab" id="redactor_tab2" style="display: none;">
|
26
|
-
<table class="redactor_ruler">
|
27
|
-
<tr>
|
28
|
-
<td nowrap>Email</td>
|
29
|
-
<td width="100%"><input id="redactor_link_mailto" style="width: 99%; font-size: 16px;" /></td>
|
30
|
-
</tr>
|
31
|
-
<tr>
|
32
|
-
<td>%RLANG.text%</td>
|
33
|
-
<td><input class="redactor_link_text" id="redactor_link_mailto_text" style="width: 99%; font-size: 16px;" /></td>
|
34
|
-
</tr>
|
35
|
-
</table>
|
36
|
-
</div>
|
37
|
-
<div class="redactor_tab" id="redactor_tab3" style="display: none;">
|
38
|
-
<table class="redactor_ruler">
|
39
|
-
<tr>
|
40
|
-
<td nowrap>%RLANG.anchor%</td>
|
41
|
-
<td width="100%"><input id="redactor_link_anchor" style="width: 99%; font-size: 16px;" /></td>
|
42
|
-
</tr>
|
43
|
-
<tr>
|
44
|
-
<td>%RLANG.text%</td>
|
45
|
-
<td><input class="redactor_link_text" id="redactor_link_anchor_text" style="width: 99%; font-size: 16px;" /></td>
|
46
|
-
</tr>
|
47
|
-
</table>
|
48
|
-
</div>
|
49
|
-
<div class="redactor_tab" id="redactor_tab4" style="display: none;">
|
50
|
-
<table class="redactor_ruler">
|
51
|
-
<tr>
|
52
|
-
<td>%RLANG.text%</td>
|
53
|
-
<td><input class="redactor_link_text" id="redactor_link_file_text" style="width: 99%; font-size: 16px;" /></td>
|
54
|
-
</tr>
|
55
|
-
<tr>
|
56
|
-
<td></td>
|
57
|
-
<td>
|
58
|
-
|
59
|
-
<input type="file" id="redactor_file" name="file" />
|
60
|
-
|
61
|
-
</td>
|
62
|
-
</tr>
|
63
|
-
</table>
|
64
|
-
|
65
|
-
</div>
|
66
|
-
|
67
|
-
|
68
|
-
</form>
|
69
|
-
|
70
|
-
<span class="redactor_btns_box">
|
71
|
-
<input type="button" id="redactor_insert_link_btn" value="%RLANG.insert%" />
|
72
|
-
<a href="javascript:void(null);" style="color: #777; font-size: 12px;" id="redactor_btn_modal_close">%RLANG.cancel%</a>
|
73
|
-
</span>
|
74
|
-
<div style="clear: both;"></div>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
|
2
|
-
<table class="redactor_ruler" width="99%">
|
3
|
-
<tr>
|
4
|
-
<td>%RLANG.Rows%:</td>
|
5
|
-
<td width="100%"><input size="5" value="2" id="redactor_table_rows" /></td>
|
6
|
-
</tr>
|
7
|
-
<tr>
|
8
|
-
<td>%RLANG.Columns%:</td>
|
9
|
-
<td><input size="5" value="3" id="redactor_table_columns" /></td>
|
10
|
-
</tr>
|
11
|
-
|
12
|
-
<tr>
|
13
|
-
<td></td>
|
14
|
-
<td>
|
15
|
-
<br />
|
16
|
-
<span class="redactor_btns_box">
|
17
|
-
<input type="button" name="upload" id="redactor_insert_table_btn" value="%RLANG.insert%" />
|
18
|
-
<a href="javascript:void(null);" style="color: #777; font-size: 12px;" id="redactor_btn_modal_close">%RLANG.cancel%</a>
|
19
|
-
</span>
|
20
|
-
<div style="clear: both;"></div>
|
21
|
-
|
22
|
-
</td>
|
23
|
-
</tr>
|
24
|
-
</table>
|
25
|
-
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<form id="redactorInsertVideoForm">
|
2
|
-
<div style="font-size: 11px; margin-bottom: 3px;">%RLANG.video_html_code%</div>
|
3
|
-
<table class="redactor_ruler" style="width: 99%;">
|
4
|
-
<tr>
|
5
|
-
<textarea id="redactor_insert_video_area" style="width: 99%; height: 160px;"></textarea>
|
6
|
-
</tr>
|
7
|
-
</table>
|
8
|
-
</form>
|
9
|
-
|
10
|
-
|
11
|
-
<span class="redactor_btns_box">
|
12
|
-
<input type="button" id="redactor_insert_video_btn" value="%RLANG.insert%" />
|
13
|
-
<a href="javascript:void(null);" style="color: #777; font-size: 12px;" id="redactor_btn_modal_close">%RLANG.cancel%</a>
|
14
|
-
</span>
|
15
|
-
<div style="clear: both;"></div>
|
@@ -1,429 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* jQuery UI Nested Sortable
|
3
|
-
* v 1.3.5 / 21 jun 2012
|
4
|
-
* http://mjsarfatti.com/code/nestedSortable
|
5
|
-
*
|
6
|
-
* Depends on:
|
7
|
-
* jquery.ui.sortable.js 1.8+
|
8
|
-
*
|
9
|
-
* Copyright (c) 2010-2012 Manuele J Sarfatti
|
10
|
-
* Licensed under the MIT License
|
11
|
-
* http://www.opensource.org/licenses/mit-license.php
|
12
|
-
*/
|
13
|
-
|
14
|
-
(function($) {
|
15
|
-
|
16
|
-
$.widget("mjs.nestedSortable", $.extend({}, $.ui.sortable.prototype, {
|
17
|
-
|
18
|
-
options: {
|
19
|
-
tabSize: 20,
|
20
|
-
disableNesting: 'mjs-nestedSortable-no-nesting',
|
21
|
-
errorClass: 'mjs-nestedSortable-error',
|
22
|
-
doNotClear: false,
|
23
|
-
listType: 'ol',
|
24
|
-
maxLevels: 0,
|
25
|
-
protectRoot: false,
|
26
|
-
rootID: null,
|
27
|
-
rtl: false,
|
28
|
-
isAllowed: function(item, parent) { return true; }
|
29
|
-
},
|
30
|
-
|
31
|
-
_create: function() {
|
32
|
-
this.element.data('sortable', this.element.data('nestedSortable'));
|
33
|
-
|
34
|
-
if (!this.element.is(this.options.listType))
|
35
|
-
throw new Error('nestedSortable: Please check the listType option is set to your actual list type');
|
36
|
-
|
37
|
-
return $.ui.sortable.prototype._create.apply(this, arguments);
|
38
|
-
},
|
39
|
-
|
40
|
-
destroy: function() {
|
41
|
-
this.element
|
42
|
-
.removeData("nestedSortable")
|
43
|
-
.unbind(".nestedSortable");
|
44
|
-
return $.ui.sortable.prototype.destroy.apply(this, arguments);
|
45
|
-
},
|
46
|
-
|
47
|
-
_mouseDrag: function(event) {
|
48
|
-
|
49
|
-
//Compute the helpers position
|
50
|
-
this.position = this._generatePosition(event);
|
51
|
-
this.positionAbs = this._convertPositionTo("absolute");
|
52
|
-
|
53
|
-
if (!this.lastPositionAbs) {
|
54
|
-
this.lastPositionAbs = this.positionAbs;
|
55
|
-
}
|
56
|
-
|
57
|
-
var o = this.options;
|
58
|
-
|
59
|
-
//Do scrolling
|
60
|
-
if(this.options.scroll) {
|
61
|
-
var scrolled = false;
|
62
|
-
if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
|
63
|
-
|
64
|
-
if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
|
65
|
-
this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
|
66
|
-
else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
|
67
|
-
this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
|
68
|
-
|
69
|
-
if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
|
70
|
-
this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
|
71
|
-
else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
|
72
|
-
this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
|
73
|
-
|
74
|
-
} else {
|
75
|
-
|
76
|
-
if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
|
77
|
-
scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
|
78
|
-
else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
|
79
|
-
scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
|
80
|
-
|
81
|
-
if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
|
82
|
-
scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
|
83
|
-
else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
|
84
|
-
scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
|
85
|
-
|
86
|
-
}
|
87
|
-
|
88
|
-
if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
|
89
|
-
$.ui.ddmanager.prepareOffsets(this, event);
|
90
|
-
}
|
91
|
-
|
92
|
-
//Regenerate the absolute position used for position checks
|
93
|
-
this.positionAbs = this._convertPositionTo("absolute");
|
94
|
-
|
95
|
-
// Find the top offset before rearrangement,
|
96
|
-
var previousTopOffset = this.placeholder.offset().top;
|
97
|
-
|
98
|
-
//Set the helper position
|
99
|
-
if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
|
100
|
-
if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
|
101
|
-
|
102
|
-
//Rearrange
|
103
|
-
for (var i = this.items.length - 1; i >= 0; i--) {
|
104
|
-
|
105
|
-
//Cache variables and intersection, continue if no intersection
|
106
|
-
var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
|
107
|
-
if (!intersection) continue;
|
108
|
-
|
109
|
-
if(itemElement != this.currentItem[0] //cannot intersect with itself
|
110
|
-
&& this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
|
111
|
-
&& !$.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
|
112
|
-
&& (this.options.type == 'semi-dynamic' ? !$.contains(this.element[0], itemElement) : true)
|
113
|
-
//&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container
|
114
|
-
) {
|
115
|
-
|
116
|
-
$(itemElement).mouseenter();
|
117
|
-
|
118
|
-
this.direction = intersection == 1 ? "down" : "up";
|
119
|
-
|
120
|
-
if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
|
121
|
-
$(itemElement).mouseleave();
|
122
|
-
this._rearrange(event, item);
|
123
|
-
} else {
|
124
|
-
break;
|
125
|
-
}
|
126
|
-
|
127
|
-
// Clear emtpy ul's/ol's
|
128
|
-
this._clearEmpty(itemElement);
|
129
|
-
|
130
|
-
this._trigger("change", event, this._uiHash());
|
131
|
-
break;
|
132
|
-
}
|
133
|
-
}
|
134
|
-
|
135
|
-
var parentItem = (this.placeholder[0].parentNode.parentNode &&
|
136
|
-
$(this.placeholder[0].parentNode.parentNode).closest('.ui-sortable').length)
|
137
|
-
? $(this.placeholder[0].parentNode.parentNode)
|
138
|
-
: null,
|
139
|
-
level = this._getLevel(this.placeholder),
|
140
|
-
childLevels = this._getChildLevels(this.helper);
|
141
|
-
|
142
|
-
// To find the previous sibling in the list, keep backtracking until we hit a valid list item.
|
143
|
-
var previousItem = this.placeholder[0].previousSibling ? $(this.placeholder[0].previousSibling) : null;
|
144
|
-
if (previousItem != null) {
|
145
|
-
while (previousItem[0].nodeName.toLowerCase() != 'li' || previousItem[0] == this.currentItem[0] || previousItem[0] == this.helper[0]) {
|
146
|
-
if (previousItem[0].previousSibling) {
|
147
|
-
previousItem = $(previousItem[0].previousSibling);
|
148
|
-
} else {
|
149
|
-
previousItem = null;
|
150
|
-
break;
|
151
|
-
}
|
152
|
-
}
|
153
|
-
}
|
154
|
-
|
155
|
-
// To find the next sibling in the list, keep stepping forward until we hit a valid list item.
|
156
|
-
var nextItem = this.placeholder[0].nextSibling ? $(this.placeholder[0].nextSibling) : null;
|
157
|
-
if (nextItem != null) {
|
158
|
-
while (nextItem[0].nodeName.toLowerCase() != 'li' || nextItem[0] == this.currentItem[0] || nextItem[0] == this.helper[0]) {
|
159
|
-
if (nextItem[0].nextSibling) {
|
160
|
-
nextItem = $(nextItem[0].nextSibling);
|
161
|
-
} else {
|
162
|
-
nextItem = null;
|
163
|
-
break;
|
164
|
-
}
|
165
|
-
}
|
166
|
-
}
|
167
|
-
|
168
|
-
var newList = document.createElement(o.listType);
|
169
|
-
|
170
|
-
this.beyondMaxLevels = 0;
|
171
|
-
|
172
|
-
// If the item is moved to the left, send it to its parent's level unless there are siblings below it.
|
173
|
-
if (parentItem != null && nextItem == null &&
|
174
|
-
(o.rtl && (this.positionAbs.left + this.helper.outerWidth() > parentItem.offset().left + parentItem.outerWidth()) ||
|
175
|
-
!o.rtl && (this.positionAbs.left < parentItem.offset().left))) {
|
176
|
-
parentItem.after(this.placeholder[0]);
|
177
|
-
this._clearEmpty(parentItem[0]);
|
178
|
-
this._trigger("change", event, this._uiHash());
|
179
|
-
}
|
180
|
-
// If the item is below a sibling and is moved to the right, make it a child of that sibling.
|
181
|
-
else if (previousItem != null &&
|
182
|
-
(o.rtl && (this.positionAbs.left + this.helper.outerWidth() < previousItem.offset().left + previousItem.outerWidth() - o.tabSize) ||
|
183
|
-
!o.rtl && (this.positionAbs.left > previousItem.offset().left + o.tabSize))) {
|
184
|
-
this._isAllowed(previousItem, level, level+childLevels+1);
|
185
|
-
if (!previousItem.children(o.listType).length) {
|
186
|
-
previousItem[0].appendChild(newList);
|
187
|
-
}
|
188
|
-
// If this item is being moved from the top, add it to the top of the list.
|
189
|
-
if (previousTopOffset && (previousTopOffset <= previousItem.offset().top)) {
|
190
|
-
previousItem.children(o.listType).prepend(this.placeholder);
|
191
|
-
}
|
192
|
-
// Otherwise, add it to the bottom of the list.
|
193
|
-
else {
|
194
|
-
previousItem.children(o.listType)[0].appendChild(this.placeholder[0]);
|
195
|
-
}
|
196
|
-
this._trigger("change", event, this._uiHash());
|
197
|
-
}
|
198
|
-
else {
|
199
|
-
this._isAllowed(parentItem, level, level+childLevels);
|
200
|
-
}
|
201
|
-
|
202
|
-
//Post events to containers
|
203
|
-
this._contactContainers(event);
|
204
|
-
|
205
|
-
//Interconnect with droppables
|
206
|
-
if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
|
207
|
-
|
208
|
-
//Call callbacks
|
209
|
-
this._trigger('sort', event, this._uiHash());
|
210
|
-
|
211
|
-
this.lastPositionAbs = this.positionAbs;
|
212
|
-
return false;
|
213
|
-
|
214
|
-
},
|
215
|
-
|
216
|
-
_mouseStop: function(event, noPropagation) {
|
217
|
-
|
218
|
-
// If the item is in a position not allowed, send it back
|
219
|
-
if (this.beyondMaxLevels) {
|
220
|
-
|
221
|
-
this.placeholder.removeClass(this.options.errorClass);
|
222
|
-
|
223
|
-
if (this.domPosition.prev) {
|
224
|
-
$(this.domPosition.prev).after(this.placeholder);
|
225
|
-
} else {
|
226
|
-
$(this.domPosition.parent).prepend(this.placeholder);
|
227
|
-
}
|
228
|
-
|
229
|
-
this._trigger("revert", event, this._uiHash());
|
230
|
-
|
231
|
-
}
|
232
|
-
|
233
|
-
// Clean last empty ul/ol
|
234
|
-
for (var i = this.items.length - 1; i >= 0; i--) {
|
235
|
-
var item = this.items[i].item[0];
|
236
|
-
this._clearEmpty(item);
|
237
|
-
}
|
238
|
-
|
239
|
-
$.ui.sortable.prototype._mouseStop.apply(this, arguments);
|
240
|
-
|
241
|
-
},
|
242
|
-
|
243
|
-
serialize: function(options) {
|
244
|
-
|
245
|
-
var o = $.extend({}, this.options, options),
|
246
|
-
items = this._getItemsAsjQuery(o && o.connected),
|
247
|
-
str = [];
|
248
|
-
|
249
|
-
$(items).each(function() {
|
250
|
-
var res = ($(o.item || this).attr(o.attribute || 'id') || '')
|
251
|
-
.match(o.expression || (/(.+)[-=_](.+)/)),
|
252
|
-
pid = ($(o.item || this).parent(o.listType)
|
253
|
-
.parent(o.items)
|
254
|
-
.attr(o.attribute || 'id') || '')
|
255
|
-
.match(o.expression || (/(.+)[-=_](.+)/));
|
256
|
-
|
257
|
-
if (res) {
|
258
|
-
str.push(((o.key || res[1]) + '[' + (o.key && o.expression ? res[1] : res[2]) + ']')
|
259
|
-
+ '='
|
260
|
-
+ (pid ? (o.key && o.expression ? pid[1] : pid[2]) : o.rootID));
|
261
|
-
}
|
262
|
-
});
|
263
|
-
|
264
|
-
if(!str.length && o.key) {
|
265
|
-
str.push(o.key + '=');
|
266
|
-
}
|
267
|
-
|
268
|
-
return str.join('&');
|
269
|
-
|
270
|
-
},
|
271
|
-
|
272
|
-
toHierarchy: function(options) {
|
273
|
-
|
274
|
-
var o = $.extend({}, this.options, options),
|
275
|
-
sDepth = o.startDepthCount || 0,
|
276
|
-
ret = [];
|
277
|
-
|
278
|
-
$(this.element).children(o.items).each(function () {
|
279
|
-
var level = _recursiveItems(this);
|
280
|
-
ret.push(level);
|
281
|
-
});
|
282
|
-
|
283
|
-
return ret;
|
284
|
-
|
285
|
-
function _recursiveItems(item) {
|
286
|
-
var id = ($(item).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
|
287
|
-
if (id) {
|
288
|
-
var currentItem = {"id" : id[2]};
|
289
|
-
if ($(item).children(o.listType).children(o.items).length > 0) {
|
290
|
-
currentItem.children = [];
|
291
|
-
$(item).children(o.listType).children(o.items).each(function() {
|
292
|
-
var level = _recursiveItems(this);
|
293
|
-
currentItem.children.push(level);
|
294
|
-
});
|
295
|
-
}
|
296
|
-
return currentItem;
|
297
|
-
}
|
298
|
-
}
|
299
|
-
},
|
300
|
-
|
301
|
-
toArray: function(options) {
|
302
|
-
|
303
|
-
var o = $.extend({}, this.options, options),
|
304
|
-
sDepth = o.startDepthCount || 0,
|
305
|
-
ret = [],
|
306
|
-
left = 2;
|
307
|
-
|
308
|
-
ret.push({
|
309
|
-
"item_id": o.rootID,
|
310
|
-
"parent_id": 'none',
|
311
|
-
"depth": sDepth,
|
312
|
-
"left": '1',
|
313
|
-
"right": ($(o.items, this.element).length + 1) * 2
|
314
|
-
});
|
315
|
-
|
316
|
-
$(this.element).children(o.items).each(function () {
|
317
|
-
left = _recursiveArray(this, sDepth + 1, left);
|
318
|
-
});
|
319
|
-
|
320
|
-
ret = ret.sort(function(a,b){ return (a.left - b.left); });
|
321
|
-
|
322
|
-
return ret;
|
323
|
-
|
324
|
-
function _recursiveArray(item, depth, left) {
|
325
|
-
|
326
|
-
var right = left + 1,
|
327
|
-
id,
|
328
|
-
pid;
|
329
|
-
|
330
|
-
if ($(item).children(o.listType).children(o.items).length > 0) {
|
331
|
-
depth ++;
|
332
|
-
$(item).children(o.listType).children(o.items).each(function () {
|
333
|
-
right = _recursiveArray($(this), depth, right);
|
334
|
-
});
|
335
|
-
depth --;
|
336
|
-
}
|
337
|
-
|
338
|
-
id = ($(item).attr(o.attribute || 'id')).match(o.expression || (/(.+)[-=_](.+)/));
|
339
|
-
|
340
|
-
if (depth === sDepth + 1) {
|
341
|
-
pid = o.rootID;
|
342
|
-
} else {
|
343
|
-
var parentItem = ($(item).parent(o.listType)
|
344
|
-
.parent(o.items)
|
345
|
-
.attr(o.attribute || 'id'))
|
346
|
-
.match(o.expression || (/(.+)[-=_](.+)/));
|
347
|
-
pid = parentItem[2];
|
348
|
-
}
|
349
|
-
|
350
|
-
if (id) {
|
351
|
-
ret.push({"item_id": id[2], "parent_id": pid, "depth": depth, "left": left, "right": right});
|
352
|
-
}
|
353
|
-
|
354
|
-
left = right + 1;
|
355
|
-
return left;
|
356
|
-
}
|
357
|
-
|
358
|
-
},
|
359
|
-
|
360
|
-
_clearEmpty: function(item) {
|
361
|
-
|
362
|
-
var emptyList = $(item).children(this.options.listType);
|
363
|
-
if (emptyList.length && !emptyList.children().length && !this.options.doNotClear) {
|
364
|
-
emptyList.remove();
|
365
|
-
}
|
366
|
-
|
367
|
-
},
|
368
|
-
|
369
|
-
_getLevel: function(item) {
|
370
|
-
|
371
|
-
var level = 1;
|
372
|
-
|
373
|
-
if (this.options.listType) {
|
374
|
-
var list = item.closest(this.options.listType);
|
375
|
-
while (list && list.length > 0 &&
|
376
|
-
!list.is('.ui-sortable')) {
|
377
|
-
level++;
|
378
|
-
list = list.parent().closest(this.options.listType);
|
379
|
-
}
|
380
|
-
}
|
381
|
-
|
382
|
-
return level;
|
383
|
-
},
|
384
|
-
|
385
|
-
_getChildLevels: function(parent, depth) {
|
386
|
-
var self = this,
|
387
|
-
o = this.options,
|
388
|
-
result = 0;
|
389
|
-
depth = depth || 0;
|
390
|
-
|
391
|
-
$(parent).children(o.listType).children(o.items).each(function (index, child) {
|
392
|
-
result = Math.max(self._getChildLevels(child, depth + 1), result);
|
393
|
-
});
|
394
|
-
|
395
|
-
return depth ? result + 1 : result;
|
396
|
-
},
|
397
|
-
|
398
|
-
_isAllowed: function(parentItem, level, levels) {
|
399
|
-
var o = this.options,
|
400
|
-
isRoot = $(this.domPosition.parent).hasClass('ui-sortable') ? true : false,
|
401
|
-
maxLevels = this.placeholder.closest('.ui-sortable').nestedSortable('option', 'maxLevels'); // this takes into account the maxLevels set to the recipient list
|
402
|
-
|
403
|
-
// Is the root protected?
|
404
|
-
// Are we trying to nest under a no-nest?
|
405
|
-
// Are we nesting too deep?
|
406
|
-
if (!o.isAllowed(this.currentItem, parentItem) ||
|
407
|
-
parentItem && parentItem.hasClass(o.disableNesting) ||
|
408
|
-
o.protectRoot && (parentItem == null && !isRoot || isRoot && level > 1)) {
|
409
|
-
this.placeholder.addClass(o.errorClass);
|
410
|
-
if (maxLevels < levels && maxLevels != 0) {
|
411
|
-
this.beyondMaxLevels = levels - maxLevels;
|
412
|
-
} else {
|
413
|
-
this.beyondMaxLevels = 1;
|
414
|
-
}
|
415
|
-
} else {
|
416
|
-
if (maxLevels < levels && maxLevels != 0) {
|
417
|
-
this.placeholder.addClass(o.errorClass);
|
418
|
-
this.beyondMaxLevels = levels - maxLevels;
|
419
|
-
} else {
|
420
|
-
this.placeholder.removeClass(o.errorClass);
|
421
|
-
this.beyondMaxLevels = 0;
|
422
|
-
}
|
423
|
-
}
|
424
|
-
}
|
425
|
-
|
426
|
-
}));
|
427
|
-
|
428
|
-
$.mjs.nestedSortable.prototype.options = $.extend({}, $.ui.sortable.prototype.options, $.mjs.nestedSortable.prototype.options);
|
429
|
-
})(jQuery);
|
@@ -1,21 +0,0 @@
|
|
1
|
-
//= require jquery
|
2
|
-
//= require jquery_ujs
|
3
|
-
//= require admin/lightbox/js/jquery.lightbox-0.5
|
4
|
-
|
5
|
-
//= require jquery-migrate-1.2.1
|
6
|
-
//= require redactor/redactor
|
7
|
-
//= require redactor/langs/ru
|
8
|
-
//= require redactor/toolbars/default
|
9
|
-
|
10
|
-
//= require jquery.ui.sortable
|
11
|
-
//=# require admin/jquery.mjs.nestedSortable.js
|
12
|
-
|
13
|
-
var lightBox;
|
14
|
-
|
15
|
-
$(function(){
|
16
|
-
|
17
|
-
lightBox = $("ul.photos:not(.no-lb) a:not(.del)").lightBox();
|
18
|
-
|
19
|
-
$('textarea:not(.nowred)').redactor();
|
20
|
-
|
21
|
-
});
|
@@ -1,14 +0,0 @@
|
|
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
|
-
// compiled file.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require jquery
|
14
|
-
//= require jquery_ujs
|