constructor-core 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{core/app → app}/assets/images/constructor_core/glyphicons-halflings-white.png +0 -0
- data/{core/app → app}/assets/images/constructor_core/glyphicons-halflings.png +0 -0
- data/{core/app → app}/assets/images/constructor_core/minus.gif +0 -0
- data/{core/app → app}/assets/images/constructor_core/plus.gif +0 -0
- data/{core/app → app}/assets/images/constructor_core/rss.png +0 -0
- data/{core/app → app}/assets/images/constructor_core/treeview-black-line.gif +0 -0
- data/{core/app → app}/assets/images/constructor_core/treeview-black.gif +0 -0
- data/{core/app → app}/assets/images/constructor_core/treeview-default-line.gif +0 -0
- data/{core/app → app}/assets/images/constructor_core/treeview-default.gif +0 -0
- data/{core/app → app}/assets/images/constructor_core/treeview-famfamfam-line.gif +0 -0
- data/{core/app → app}/assets/images/constructor_core/treeview-famfamfam.gif +0 -0
- data/{core/app → app}/assets/images/constructor_core/treeview-gray-line.gif +0 -0
- data/{core/app → app}/assets/images/constructor_core/treeview-gray.gif +0 -0
- data/{core/app → app}/assets/images/constructor_core/treeview-red-line.gif +0 -0
- data/{core/app → app}/assets/images/constructor_core/treeview-red.gif +0 -0
- data/{core/app → app}/assets/images/constructor_core/twitter.png +0 -0
- data/{core/app → app}/assets/images/constructor_core/widgets.png +0 -0
- data/{core/app → app}/assets/javascripts/constructor_core/application.js.coffee +0 -0
- data/{core/app → app}/assets/javascripts/constructor_core/bootstrap.js +0 -0
- data/{core/app → app}/assets/javascripts/constructor_core/jquery.cookie.js +0 -0
- data/{core/app → app}/assets/javascripts/constructor_core/jquery_bundle.js.coffee +0 -0
- data/{core/app → app}/assets/javascripts/constructor_core/keys_snippet.js +0 -0
- data/{core/app → app}/assets/javascripts/constructor_core/retina.js +0 -0
- data/{core/app → app}/assets/javascripts/constructor_core/urlify.js +0 -0
- data/{core/app → app}/assets/stylesheets/constructor_core/application.css.scss +0 -0
- data/{core/app → app}/assets/stylesheets/constructor_core/main.css.scss +0 -0
- data/{core/app → app}/controllers/constructor_core/application_controller.rb +0 -0
- data/{core/app → app}/controllers/constructor_core/sessions_controller.rb +0 -0
- data/{core/app → app}/controllers/constructor_core/users_controller.rb +0 -0
- data/{core/app → app}/helpers/constructor_core/application_helper.rb +0 -0
- data/{core/app → app}/models/constructor_core/user.rb +0 -0
- data/{core/app → app}/views/constructor_core/devise/confirmations/new.html.haml +0 -0
- data/{core/app → app}/views/constructor_core/devise/mailer/confirmation_instructions.html.haml +0 -0
- data/{core/app → app}/views/constructor_core/devise/mailer/reset_password_instructions.html.haml +0 -0
- data/{core/app → app}/views/constructor_core/devise/mailer/unlock_instructions.html.haml +0 -0
- data/{core/app → app}/views/constructor_core/devise/passwords/edit.html.haml +0 -0
- data/{core/app → app}/views/constructor_core/devise/passwords/new.html.haml +0 -0
- data/{core/app → app}/views/constructor_core/devise/registrations/edit.html.haml +0 -0
- data/{core/app → app}/views/constructor_core/devise/registrations/new.html.haml +0 -0
- data/{core/app → app}/views/constructor_core/devise/shared/_links.html.haml +0 -0
- data/{core/app → app}/views/constructor_core/devise/unlocks/new.html.haml +0 -0
- data/{core/app → app}/views/constructor_core/sessions/new.html.haml +0 -0
- data/{core/app → app}/views/constructor_core/users/profile.haml +0 -0
- data/{core/app → app}/views/layouts/constructor_core/application_core.haml +0 -0
- data/{core/config → config}/environments/production.rb +0 -0
- data/{core/config → config}/initializers/devise.rb +0 -0
- data/{core/config → config}/locales/devise.en.yml +0 -0
- data/{core/config → config}/locales/devise.fr.yml +0 -0
- data/{core/config → config}/locales/devise.ru.yml +0 -0
- data/{core/config → config}/locales/en.yml +0 -0
- data/{core/config → config}/locales/fr.yml +0 -0
- data/{core/config → config}/locales/ru.yml +0 -0
- data/config/routes.rb +17 -3
- data/{core/constructor-core.gemspec → constructor-core.gemspec} +0 -1
- data/{core/db → db}/migrate/1_devise_users.rb +0 -0
- data/{core/db → db}/migrate/2_add_default_user.rb +0 -0
- data/{core/lib → lib}/constructor-core.rb +0 -0
- data/{core/lib → lib}/constructor_core/engine.rb +0 -0
- data/{core/lib → lib}/constructor_core/version.rb +1 -1
- data/{core/vendor → vendor}/assets/javascripts/.gitkeep +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/ckeditor.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/config.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/lang/en.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/lang/ru.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/preview/preview.html +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/scayt/README.md +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/default.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/wsc/README.md +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +0 -0
- data/{core/vendor → vendor}/assets/javascripts/ckeditor/styles.js +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/.gitkeep +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/contents.css +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/dialog.css +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/dialog_ie.css +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/dialog_ie7.css +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/dialog_ie8.css +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/dialog_opera.css +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/editor.css +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/editor_gecko.css +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/editor_ie.css +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/editor_ie7.css +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/editor_ie8.css +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/icons.png +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/images/arrow.png +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/images/close.png +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/images/mini.png +0 -0
- data/{core/vendor → vendor}/assets/stylesheets/ckeditor/skins/moono/readme.md +0 -0
- metadata +211 -396
- data/.gitignore +0 -14
- data/.rspec +0 -2
- data/.travis.yml +0 -13
- data/.yardopts +0 -9
- data/Gemfile +0 -31
- data/Guardfile +0 -15
- data/LICENSE.md +0 -7
- data/README.md +0 -35
- data/Rakefile +0 -19
- data/bin/rails +0 -8
- data/config.ru +0 -4
- data/constructor-cms.gemspec +0 -26
- data/core/config/routes.rb +0 -18
- data/lib/constructor-cms.rb +0 -3
- data/lib/constructor-cms/engine.rb +0 -6
- data/pages/app/assets/images/constructor_pages/arrow_down.png +0 -0
- data/pages/app/assets/images/constructor_pages/arrow_up.png +0 -0
- data/pages/app/assets/images/constructor_pages/information.png +0 -0
- data/pages/app/assets/images/constructor_pages/page_white_edit.png +0 -0
- data/pages/app/assets/images/constructor_pages/photos.png +0 -0
- data/pages/app/assets/javascripts/constructor_pages/ajax_pages.js +0 -61
- data/pages/app/assets/javascripts/constructor_pages/jquery.history.js +0 -1
- data/pages/app/controllers/constructor_pages/application_controller.rb +0 -20
- data/pages/app/controllers/constructor_pages/fields_controller.rb +0 -70
- data/pages/app/controllers/constructor_pages/pages_controller.rb +0 -116
- data/pages/app/controllers/constructor_pages/templates_controller.rb +0 -62
- data/pages/app/helpers/constructor_pages/code_name_uniq.rb +0 -7
- data/pages/app/helpers/constructor_pages/fields_helper.rb +0 -18
- data/pages/app/helpers/constructor_pages/pages_helper.rb +0 -22
- data/pages/app/helpers/constructor_pages/templates_helper.rb +0 -13
- data/pages/app/helpers/constructor_pages/treeview_helper.rb +0 -33
- data/pages/app/models/constructor_pages/field.rb +0 -59
- data/pages/app/models/constructor_pages/page.rb +0 -171
- data/pages/app/models/constructor_pages/template.rb +0 -38
- data/pages/app/models/constructor_pages/types/boolean_type.rb +0 -11
- data/pages/app/models/constructor_pages/types/date_type.rb +0 -11
- data/pages/app/models/constructor_pages/types/float_type.rb +0 -11
- data/pages/app/models/constructor_pages/types/html_type.rb +0 -11
- data/pages/app/models/constructor_pages/types/image_type.rb +0 -19
- data/pages/app/models/constructor_pages/types/integer_type.rb +0 -11
- data/pages/app/models/constructor_pages/types/string_type.rb +0 -11
- data/pages/app/models/constructor_pages/types/text_type.rb +0 -11
- data/pages/app/views/constructor_pages/fields/_form.haml +0 -29
- data/pages/app/views/constructor_pages/fields/edit.haml +0 -6
- data/pages/app/views/constructor_pages/fields/new.haml +0 -6
- data/pages/app/views/constructor_pages/fields/types/_boolean.haml +0 -1
- data/pages/app/views/constructor_pages/fields/types/_date.haml +0 -1
- data/pages/app/views/constructor_pages/fields/types/_float.haml +0 -1
- data/pages/app/views/constructor_pages/fields/types/_html.haml +0 -1
- data/pages/app/views/constructor_pages/fields/types/_image.haml +0 -7
- data/pages/app/views/constructor_pages/fields/types/_integer.haml +0 -1
- data/pages/app/views/constructor_pages/fields/types/_string.haml +0 -1
- data/pages/app/views/constructor_pages/fields/types/_text.haml +0 -1
- data/pages/app/views/constructor_pages/pages/_breadcrumbs.haml +0 -7
- data/pages/app/views/constructor_pages/pages/_form.haml +0 -98
- data/pages/app/views/constructor_pages/pages/_menu.haml +0 -8
- data/pages/app/views/constructor_pages/pages/_submenu.haml +0 -6
- data/pages/app/views/constructor_pages/pages/edit.haml +0 -6
- data/pages/app/views/constructor_pages/pages/index.haml +0 -42
- data/pages/app/views/constructor_pages/pages/new.haml +0 -6
- data/pages/app/views/constructor_pages/pages/show.haml +0 -5
- data/pages/app/views/constructor_pages/partials/_arrow_buttons.haml +0 -6
- data/pages/app/views/constructor_pages/templates/_form.haml +0 -53
- data/pages/app/views/constructor_pages/templates/edit.haml +0 -6
- data/pages/app/views/constructor_pages/templates/index.haml +0 -24
- data/pages/app/views/constructor_pages/templates/new.haml +0 -6
- data/pages/config/initializers/dragonfly.rb +0 -9
- data/pages/config/locales/en.yml +0 -65
- data/pages/config/locales/fr.yml +0 -65
- data/pages/config/locales/ru.yml +0 -100
- data/pages/config/routes.rb +0 -26
- data/pages/constructor-pages.gemspec +0 -31
- data/pages/db/migrate/10_create_html_types.rb +0 -15
- data/pages/db/migrate/11_create_image_types.rb +0 -16
- data/pages/db/migrate/12_add_default_template.rb +0 -13
- data/pages/db/migrate/1_create_pages.rb +0 -27
- data/pages/db/migrate/2_create_templates.rb +0 -18
- data/pages/db/migrate/3_create_fields.rb +0 -17
- data/pages/db/migrate/4_create_string_types.rb +0 -15
- data/pages/db/migrate/5_create_float_types.rb +0 -15
- data/pages/db/migrate/6_create_boolean_types.rb +0 -15
- data/pages/db/migrate/7_create_integer_types.rb +0 -15
- data/pages/db/migrate/8_create_text_types.rb +0 -15
- data/pages/db/migrate/9_create_date_types.rb +0 -15
- data/pages/lib/constructor-pages.rb +0 -6
- data/pages/lib/constructor_pages/engine.rb +0 -6
- data/pages/public/hello.txt +0 -1
- data/pages/spec/features/constructor_pages/fields_spec.rb +0 -217
- data/pages/spec/features/constructor_pages/pages_spec.rb +0 -313
- data/pages/spec/features/constructor_pages/templates_spec.rb +0 -267
- data/pages/spec/helpers/constructor_pages/.keep +0 -0
- data/pages/spec/models/constructor_pages/field_spec.rb +0 -135
- data/pages/spec/models/constructor_pages/page_spec.rb +0 -420
- data/pages/spec/models/constructor_pages/template_spec.rb +0 -34
- data/pages/spec/models/constructor_pages/types/boolean_type_spec.rb +0 -21
- data/pages/spec/models/constructor_pages/types/date_type_spec.rb +0 -21
- data/pages/spec/models/constructor_pages/types/float_type_spec.rb +0 -21
- data/pages/spec/models/constructor_pages/types/html_type_spec.rb +0 -63
- data/pages/spec/models/constructor_pages/types/integer_type_spec.rb +0 -24
- data/pages/spec/models/constructor_pages/types/string_type_spec.rb +0 -21
- data/pages/spec/models/constructor_pages/types/text_type_spec.rb +0 -63
- data/pages/spec/routing/constructor_pages/.keep +0 -0
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/views/html_templates/page.haml +0 -1
- data/spec/dummy/app/views/layouts/application.haml +0 -10
- 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.ru +0 -4
- data/spec/dummy/config/application.rb +0 -23
- 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 -5
- data/spec/dummy/config/routes.rb +0 -3
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/lib/tasks/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- 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/dummy/public/robots.txt +0 -5
- data/spec/spec_helper.rb +0 -46
- data/tasks/constructor-cms_tasks.rake +0 -15
data/.gitignore
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
data/.yardopts
DELETED
data/Gemfile
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
source 'http://rubygems.org'
|
2
|
-
|
3
|
-
gemspec
|
4
|
-
|
5
|
-
gem 'awesome_nested_set', github: 'ivanzotov/awesome_nested_set', branch: 'rails4'
|
6
|
-
|
7
|
-
group :test do
|
8
|
-
gem 'coveralls', require: false
|
9
|
-
gem 'simplecov', :require => false
|
10
|
-
gem 'guard-rspec'
|
11
|
-
end
|
12
|
-
|
13
|
-
group :assets do
|
14
|
-
gem 'sass-rails', '~> 4.0.0.rc2'
|
15
|
-
gem 'coffee-rails', '~> 4.0.0'
|
16
|
-
gem 'less-rails'
|
17
|
-
gem 'therubyracer', :platforms => :ruby
|
18
|
-
|
19
|
-
gem 'uglifier', '>= 1.3.0'
|
20
|
-
end
|
21
|
-
|
22
|
-
gem 'jquery-rails'
|
23
|
-
|
24
|
-
platform :jruby do
|
25
|
-
gem 'activerecord-jdbcsqlite3-adapter', '1.3.0.beta2'
|
26
|
-
gem 'therubyrhino', group: :assets
|
27
|
-
end
|
28
|
-
|
29
|
-
platform :ruby do
|
30
|
-
gem 'sqlite3'
|
31
|
-
end
|
data/Guardfile
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
extensions = %w(pages)
|
2
|
-
|
3
|
-
guard 'rspec', :spec_paths => extensions.map{|e| "#{e}/spec"}, :cli => (['~/.rspec', '.rspec'].map{|f| File.read(File.expand_path(f)).split("\n").join(' ') if File.exists?(File.expand_path(f))}.join(' ')) do
|
4
|
-
extensions.each do |extension|
|
5
|
-
watch(%r{^#{extension}/spec/.+_spec\.rb$})
|
6
|
-
watch(%r{^#{extension}/app/(.+)\.rb$}) { |m| "#{extension}/spec/#{m[1]}_spec.rb" }
|
7
|
-
watch(%r{^#{extension}/lib/(.+)\.rb$}) { |m| "#{extension}/spec/lib/#{m[1]}_spec.rb" }
|
8
|
-
watch(%r{^#{extension}/app/controllers/constructor_#{extension}/(.+)_(controller)\.rb$}) { |m| "#{extension}/spec/features/constructor_#{extension}/#{m[1]}_spec.rb" }
|
9
|
-
watch(%r{^#{extension}/spec/support/(.+)\.rb$}) { "#{extension}/spec" }
|
10
|
-
watch("#{extension}/spec/spec_helper.rb") { "#{extension}/spec" }
|
11
|
-
# Capybara request specs
|
12
|
-
watch(%r{^#{extension}/app/views/(.+)/.*\.(erb|haml)$}) { |m| "#{extension}/spec/requests/#{m[1]}_spec.rb" }
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
data/LICENSE.md
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
Copyright (c) 2012—2013 Ivan Zotov
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
-
|
5
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
-
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
# Constructor CMS
|
2
|
-
|
3
|
-
Constructor – an open source Ruby on Rails content management system for Rails 4.
|
4
|
-
|
5
|
-
[![Gem Version](https://badge.fury.io/rb/constructor-cms.png)](https://rubygems.org/gems/constructor-cms)
|
6
|
-
[![Build Status](https://travis-ci.org/ivanzotov/constructor.png?branch=master)](https://travis-ci.org/ivanzotov/constructor)
|
7
|
-
[![Dependency Status](https://gemnasium.com/ivanzotov/constructor.png)](https://gemnasium.com/ivanzotov/constructor)
|
8
|
-
[![Code Climate](https://codeclimate.com/github/ivanzotov/constructor.png)](https://codeclimate.com/github/ivanzotov/constructor)
|
9
|
-
[![Coverage Status](https://coveralls.io/repos/ivanzotov/constructor/badge.png)](https://coveralls.io/r/ivanzotov/constructor)
|
10
|
-
|
11
|
-
## Installation
|
12
|
-
|
13
|
-
### Add to Gemfile
|
14
|
-
|
15
|
-
gem 'constructor-cms', '~> 0.7.2'
|
16
|
-
|
17
|
-
### Install
|
18
|
-
|
19
|
-
bundle install
|
20
|
-
|
21
|
-
### Migrate
|
22
|
-
|
23
|
-
rake railties:install:migrations
|
24
|
-
|
25
|
-
rake db:migrate
|
26
|
-
|
27
|
-
## Screenshots
|
28
|
-
![Screenshot structure](https://s3-eu-west-1.amazonaws.com/constructorcms/screenshot_structure_0.5.3.png)
|
29
|
-
|
30
|
-
## Copyright
|
31
|
-
Copyright © 2012—2013 Ivan Zotov. See [LICENSE][] for details.
|
32
|
-
|
33
|
-
[license]: LICENSE.md
|
34
|
-
|
35
|
-
|
data/Rakefile
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
|
-
begin
|
3
|
-
require 'bundler/setup'
|
4
|
-
rescue LoadError
|
5
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
-
end
|
7
|
-
|
8
|
-
Bundler::GemHelper.install_tasks
|
9
|
-
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
10
|
-
load 'rails/tasks/engine.rake'
|
11
|
-
require 'rspec/core/rake_task'
|
12
|
-
|
13
|
-
Dir[File.expand_path('../tasks/**/*', __FILE__)].each {|task| load task}
|
14
|
-
|
15
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
16
|
-
t.pattern = './**/*_spec.rb'
|
17
|
-
end
|
18
|
-
|
19
|
-
task :default => :spec
|
data/bin/rails
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
|
3
|
-
|
4
|
-
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
5
|
-
ENGINE_PATH = File.expand_path('../../lib/constructor-cms/engine', __FILE__)
|
6
|
-
|
7
|
-
require 'rails/all'
|
8
|
-
require 'rails/engine/commands'
|
data/config.ru
DELETED
data/constructor-cms.gemspec
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require File.expand_path('../core/lib/constructor_core/version', __FILE__)
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.platform = Gem::Platform::RUBY
|
7
|
-
s.name = %q{constructor-cms}
|
8
|
-
s.version = ConstructorCore::VERSION
|
9
|
-
s.summary = %q{ConstructorCms}
|
10
|
-
s.authors = ['Ivan Zotov']
|
11
|
-
s.require_paths = %w(lib)
|
12
|
-
s.email = 'ivanzotov@gmail.com'
|
13
|
-
s.homepage = 'http://ivanzotov.github.com/constructor'
|
14
|
-
s.description = 'Constructor – content management system'
|
15
|
-
|
16
|
-
s.files = `git ls-files`.split("\n")
|
17
|
-
s.test_files = `git ls-files -- spec/*`.split("\n")
|
18
|
-
|
19
|
-
s.add_dependency 'constructor-core', ConstructorCore::VERSION
|
20
|
-
s.add_dependency 'constructor-pages', ConstructorCore::VERSION
|
21
|
-
|
22
|
-
s.add_development_dependency 'rspec-rails', '~> 2.12'
|
23
|
-
s.add_development_dependency 'database_cleaner'
|
24
|
-
s.add_development_dependency 'capybara'
|
25
|
-
s.add_development_dependency 'launchy'
|
26
|
-
end
|
data/core/config/routes.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
ConstructorCore::Engine.routes.draw do
|
2
|
-
scope 'admin' do
|
3
|
-
get 'profile/:id' => 'users#profile', as: :user
|
4
|
-
post 'profile/:id' => 'users#update_password'
|
5
|
-
|
6
|
-
devise_for :users, {
|
7
|
-
class_name: 'ConstructorCore::User',
|
8
|
-
module: :devise
|
9
|
-
}
|
10
|
-
end
|
11
|
-
|
12
|
-
as :user do
|
13
|
-
get '/admin' => 'sessions#new'
|
14
|
-
get '/login' => 'sessions#new'
|
15
|
-
post '/login' => 'sessions#create'
|
16
|
-
delete '/logout' => 'sessions#destroy', as: :logout
|
17
|
-
end
|
18
|
-
end
|
data/lib/constructor-cms.rb
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,61 +0,0 @@
|
|
1
|
-
//= require constructor_pages/jquery.history.js
|
2
|
-
|
3
|
-
$(document).ready(function() {
|
4
|
-
$page = {};
|
5
|
-
|
6
|
-
var History = window.History;
|
7
|
-
|
8
|
-
if ( !History.enabled ) { return false }
|
9
|
-
|
10
|
-
History.Adapter.bind(window,'statechange',function(){
|
11
|
-
update_page(History.getState().url);
|
12
|
-
});
|
13
|
-
|
14
|
-
|
15
|
-
update_pages();
|
16
|
-
});
|
17
|
-
|
18
|
-
function update_pages(){
|
19
|
-
$('.b-page-json').each(function(index, el){
|
20
|
-
var _href = $(el).attr('href');
|
21
|
-
|
22
|
-
$(el).unbind('click');
|
23
|
-
|
24
|
-
$(el).click(function(event){
|
25
|
-
event.preventDefault();
|
26
|
-
History.pushState(null, null, _href);
|
27
|
-
});
|
28
|
-
});
|
29
|
-
}
|
30
|
-
|
31
|
-
function update_page(href) {
|
32
|
-
|
33
|
-
$.get(href+'.json', function(page){
|
34
|
-
$page = page;
|
35
|
-
|
36
|
-
$('title').html(page.title || page.name);
|
37
|
-
|
38
|
-
var partials = JSON.parse(page.template);
|
39
|
-
var names = Object.keys(partials);
|
40
|
-
|
41
|
-
for (i in names) {
|
42
|
-
var name = names[i];
|
43
|
-
|
44
|
-
$('.b-page-part__'+name).html(partials[name]);
|
45
|
-
}
|
46
|
-
|
47
|
-
$("[class*='b-page-json__id-']").removeClass('active');
|
48
|
-
|
49
|
-
for (var i in $page.self_and_ancestors) {
|
50
|
-
$('.b-page-json__id-'+$page.self_and_ancestors[i]).addClass('active');
|
51
|
-
}
|
52
|
-
|
53
|
-
update_pages();
|
54
|
-
|
55
|
-
if (typeof Retina != 'undefined') {
|
56
|
-
Retina.update();
|
57
|
-
}
|
58
|
-
|
59
|
-
eval(page.js);
|
60
|
-
});
|
61
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
window.JSON||(window.JSON={}),function(){function f(a){return a<10?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";return e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g,e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d=="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));return e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g,e}}"use strict",typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var JSON=window.JSON,cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c=="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(!b||typeof b=="function"||typeof b=="object"&&typeof b.length=="number")return str("",{"":a});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(a,b){"use strict";var c=a.History=a.History||{},d=a.jQuery;if(typeof c.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");c.Adapter={bind:function(a,b,c){d(a).bind(b,c)},trigger:function(a,b,c){d(a).trigger(b,c)},extractEventData:function(a,c,d){var e=c&&c.originalEvent&&c.originalEvent[a]||d&&d[a]||b;return e},onDomLoad:function(a){d(a)}},typeof c.init!="undefined"&&c.init()}(window),function(a,b){"use strict";var c=a.document,d=a.setTimeout||d,e=a.clearTimeout||e,f=a.setInterval||f,g=a.History=a.History||{};if(typeof g.initHtml4!="undefined")throw new Error("History.js HTML4 Support has already been loaded...");g.initHtml4=function(){if(typeof g.initHtml4.initialized!="undefined")return!1;g.initHtml4.initialized=!0,g.enabled=!0,g.savedHashes=[],g.isLastHash=function(a){var b=g.getHashByIndex(),c;return c=a===b,c},g.saveHash=function(a){return g.isLastHash(a)?!1:(g.savedHashes.push(a),!0)},g.getHashByIndex=function(a){var b=null;return typeof a=="undefined"?b=g.savedHashes[g.savedHashes.length-1]:a<0?b=g.savedHashes[g.savedHashes.length+a]:b=g.savedHashes[a],b},g.discardedHashes={},g.discardedStates={},g.discardState=function(a,b,c){var d=g.getHashByState(a),e;return e={discardedState:a,backState:c,forwardState:b},g.discardedStates[d]=e,!0},g.discardHash=function(a,b,c){var d={discardedHash:a,backState:c,forwardState:b};return g.discardedHashes[a]=d,!0},g.discardedState=function(a){var b=g.getHashByState(a),c;return c=g.discardedStates[b]||!1,c},g.discardedHash=function(a){var b=g.discardedHashes[a]||!1;return b},g.recycleState=function(a){var b=g.getHashByState(a);return g.discardedState(a)&&delete g.discardedStates[b],!0},g.emulated.hashChange&&(g.hashChangeInit=function(){g.checkerFunction=null;var b="",d,e,h,i;return g.isInternetExplorer()?(d="historyjs-iframe",e=c.createElement("iframe"),e.setAttribute("id",d),e.style.display="none",c.body.appendChild(e),e.contentWindow.document.open(),e.contentWindow.document.close(),h="",i=!1,g.checkerFunction=function(){if(i)return!1;i=!0;var c=g.getHash()||"",d=g.unescapeHash(e.contentWindow.document.location.hash)||"";return c!==b?(b=c,d!==c&&(h=d=c,e.contentWindow.document.open(),e.contentWindow.document.close(),e.contentWindow.document.location.hash=g.escapeHash(c)),g.Adapter.trigger(a,"hashchange")):d!==h&&(h=d,g.setHash(d,!1)),i=!1,!0}):g.checkerFunction=function(){var c=g.getHash();return c!==b&&(b=c,g.Adapter.trigger(a,"hashchange")),!0},g.intervalList.push(f(g.checkerFunction,g.options.hashChangeInterval)),!0},g.Adapter.onDomLoad(g.hashChangeInit)),g.emulated.pushState&&(g.onHashChange=function(b){var d=b&&b.newURL||c.location.href,e=g.getHashByUrl(d),f=null,h=null,i=null,j;return g.isLastHash(e)?(g.busy(!1),!1):(g.doubleCheckComplete(),g.saveHash(e),e&&g.isTraditionalAnchor(e)?(g.Adapter.trigger(a,"anchorchange"),g.busy(!1),!1):(f=g.extractState(g.getFullUrl(e||c.location.href,!1),!0),g.isLastSavedState(f)?(g.busy(!1),!1):(h=g.getHashByState(f),j=g.discardedState(f),j?(g.getHashByIndex(-2)===g.getHashByState(j.forwardState)?g.back(!1):g.forward(!1),!1):(g.pushState(f.data,f.title,f.url,!1),!0))))},g.Adapter.bind(a,"hashchange",g.onHashChange),g.pushState=function(b,d,e,f){if(g.getHashByUrl(e))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(f!==!1&&g.busy())return g.pushQueue({scope:g,callback:g.pushState,args:arguments,queue:f}),!1;g.busy(!0);var h=g.createStateObject(b,d,e),i=g.getHashByState(h),j=g.getState(!1),k=g.getHashByState(j),l=g.getHash();return g.storeState(h),g.expectedStateId=h.id,g.recycleState(h),g.setTitle(h),i===k?(g.busy(!1),!1):i!==l&&i!==g.getShortUrl(c.location.href)?(g.setHash(i,!1),!1):(g.saveState(h),g.Adapter.trigger(a,"statechange"),g.busy(!1),!0)},g.replaceState=function(a,b,c,d){if(g.getHashByUrl(c))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(d!==!1&&g.busy())return g.pushQueue({scope:g,callback:g.replaceState,args:arguments,queue:d}),!1;g.busy(!0);var e=g.createStateObject(a,b,c),f=g.getState(!1),h=g.getStateByIndex(-2);return g.discardState(f,e,h),g.pushState(e.data,e.title,e.url,!1),!0}),g.emulated.pushState&&g.getHash()&&!g.emulated.hashChange&&g.Adapter.onDomLoad(function(){g.Adapter.trigger(a,"hashchange")})},typeof g.init!="undefined"&&g.init()}(window),function(a,b){"use strict";var c=a.console||b,d=a.document,e=a.navigator,f=a.sessionStorage||!1,g=a.setTimeout,h=a.clearTimeout,i=a.setInterval,j=a.clearInterval,k=a.JSON,l=a.alert,m=a.History=a.History||{},n=a.history;k.stringify=k.stringify||k.encode,k.parse=k.parse||k.decode;if(typeof m.init!="undefined")throw new Error("History.js Core has already been loaded...");m.init=function(){return typeof m.Adapter=="undefined"?!1:(typeof m.initCore!="undefined"&&m.initCore(),typeof m.initHtml4!="undefined"&&m.initHtml4(),!0)},m.initCore=function(){if(typeof m.initCore.initialized!="undefined")return!1;m.initCore.initialized=!0,m.options=m.options||{},m.options.hashChangeInterval=m.options.hashChangeInterval||100,m.options.safariPollInterval=m.options.safariPollInterval||500,m.options.doubleCheckInterval=m.options.doubleCheckInterval||500,m.options.storeInterval=m.options.storeInterval||1e3,m.options.busyDelay=m.options.busyDelay||250,m.options.debug=m.options.debug||!1,m.options.initialTitle=m.options.initialTitle||d.title,m.intervalList=[],m.clearAllIntervals=function(){var a,b=m.intervalList;if(typeof b!="undefined"&&b!==null){for(a=0;a<b.length;a++)j(b[a]);m.intervalList=null}},m.debug=function(){(m.options.debug||!1)&&m.log.apply(m,arguments)},m.log=function(){var a=typeof c!="undefined"&&typeof c.log!="undefined"&&typeof c.log.apply!="undefined",b=d.getElementById("log"),e,f,g,h,i;a?(h=Array.prototype.slice.call(arguments),e=h.shift(),typeof c.debug!="undefined"?c.debug.apply(c,[e,h]):c.log.apply(c,[e,h])):e="\n"+arguments[0]+"\n";for(f=1,g=arguments.length;f<g;++f){i=arguments[f];if(typeof i=="object"&&typeof k!="undefined")try{i=k.stringify(i)}catch(j){}e+="\n"+i+"\n"}return b?(b.value+=e+"\n-----\n",b.scrollTop=b.scrollHeight-b.clientHeight):a||l(e),!0},m.getInternetExplorerMajorVersion=function(){var a=m.getInternetExplorerMajorVersion.cached=typeof m.getInternetExplorerMajorVersion.cached!="undefined"?m.getInternetExplorerMajorVersion.cached:function(){var a=3,b=d.createElement("div"),c=b.getElementsByTagName("i");while((b.innerHTML="<!--[if gt IE "+ ++a+"]><i></i><![endif]-->")&&c[0]);return a>4?a:!1}();return a},m.isInternetExplorer=function(){var a=m.isInternetExplorer.cached=typeof m.isInternetExplorer.cached!="undefined"?m.isInternetExplorer.cached:Boolean(m.getInternetExplorerMajorVersion());return a},m.emulated={pushState:!Boolean(a.history&&a.history.pushState&&a.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(e.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(e.userAgent)),hashChange:Boolean(!("onhashchange"in a||"onhashchange"in d)||m.isInternetExplorer()&&m.getInternetExplorerMajorVersion()<8)},m.enabled=!m.emulated.pushState,m.bugs={setHash:Boolean(!m.emulated.pushState&&e.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(e.userAgent)),safariPoll:Boolean(!m.emulated.pushState&&e.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(e.userAgent)),ieDoubleCheck:Boolean(m.isInternetExplorer()&&m.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(m.isInternetExplorer()&&m.getInternetExplorerMajorVersion()<7)},m.isEmptyObject=function(a){for(var b in a)return!1;return!0},m.cloneObject=function(a){var b,c;return a?(b=k.stringify(a),c=k.parse(b)):c={},c},m.getRootUrl=function(){var a=d.location.protocol+"//"+(d.location.hostname||d.location.host);if(d.location.port||!1)a+=":"+d.location.port;return a+="/",a},m.getBaseHref=function(){var a=d.getElementsByTagName("base"),b=null,c="";return a.length===1&&(b=a[0],c=b.href.replace(/[^\/]+$/,"")),c=c.replace(/\/+$/,""),c&&(c+="/"),c},m.getBaseUrl=function(){var a=m.getBaseHref()||m.getBasePageUrl()||m.getRootUrl();return a},m.getPageUrl=function(){var a=m.getState(!1,!1),b=(a||{}).url||d.location.href,c;return c=b.replace(/\/+$/,"").replace(/[^\/]+$/,function(a,b,c){return/\./.test(a)?a:a+"/"}),c},m.getBasePageUrl=function(){var a=d.location.href.replace(/[#\?].*/,"").replace(/[^\/]+$/,function(a,b,c){return/[^\/]$/.test(a)?"":a}).replace(/\/+$/,"")+"/";return a},m.getFullUrl=function(a,b){var c=a,d=a.substring(0,1);return b=typeof b=="undefined"?!0:b,/[a-z]+\:\/\//.test(a)||(d==="/"?c=m.getRootUrl()+a.replace(/^\/+/,""):d==="#"?c=m.getPageUrl().replace(/#.*/,"")+a:d==="?"?c=m.getPageUrl().replace(/[\?#].*/,"")+a:b?c=m.getBaseUrl()+a.replace(/^(\.\/)+/,""):c=m.getBasePageUrl()+a.replace(/^(\.\/)+/,"")),c.replace(/\#$/,"")},m.getShortUrl=function(a){var b=a,c=m.getBaseUrl(),d=m.getRootUrl();return m.emulated.pushState&&(b=b.replace(c,"")),b=b.replace(d,"/"),m.isTraditionalAnchor(b)&&(b="./"+b),b=b.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),b},m.store={},m.idToState=m.idToState||{},m.stateToId=m.stateToId||{},m.urlToId=m.urlToId||{},m.storedStates=m.storedStates||[],m.savedStates=m.savedStates||[],m.normalizeStore=function(){m.store.idToState=m.store.idToState||{},m.store.urlToId=m.store.urlToId||{},m.store.stateToId=m.store.stateToId||{}},m.getState=function(a,b){typeof a=="undefined"&&(a=!0),typeof b=="undefined"&&(b=!0);var c=m.getLastSavedState();return!c&&b&&(c=m.createStateObject()),a&&(c=m.cloneObject(c),c.url=c.cleanUrl||c.url),c},m.getIdByState=function(a){var b=m.extractId(a.url),c;if(!b){c=m.getStateString(a);if(typeof m.stateToId[c]!="undefined")b=m.stateToId[c];else if(typeof m.store.stateToId[c]!="undefined")b=m.store.stateToId[c];else{for(;;){b=(new Date).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof m.idToState[b]=="undefined"&&typeof m.store.idToState[b]=="undefined")break}m.stateToId[c]=b,m.idToState[b]=a}}return b},m.normalizeState=function(a){var b,c;if(!a||typeof a!="object")a={};if(typeof a.normalized!="undefined")return a;if(!a.data||typeof a.data!="object")a.data={};b={},b.normalized=!0,b.title=a.title||"",b.url=m.getFullUrl(m.unescapeString(a.url||d.location.href)),b.hash=m.getShortUrl(b.url),b.data=m.cloneObject(a.data),b.id=m.getIdByState(b),b.cleanUrl=b.url.replace(/\??\&_suid.*/,""),b.url=b.cleanUrl,c=!m.isEmptyObject(b.data);if(b.title||c)b.hash=m.getShortUrl(b.url).replace(/\??\&_suid.*/,""),/\?/.test(b.hash)||(b.hash+="?"),b.hash+="&_suid="+b.id;return b.hashedUrl=m.getFullUrl(b.hash),(m.emulated.pushState||m.bugs.safariPoll)&&m.hasUrlDuplicate(b)&&(b.url=b.hashedUrl),b},m.createStateObject=function(a,b,c){var d={data:a,title:b,url:c};return d=m.normalizeState(d),d},m.getStateById=function(a){a=String(a);var c=m.idToState[a]||m.store.idToState[a]||b;return c},m.getStateString=function(a){var b,c,d;return b=m.normalizeState(a),c={data:b.data,title:a.title,url:a.url},d=k.stringify(c),d},m.getStateId=function(a){var b,c;return b=m.normalizeState(a),c=b.id,c},m.getHashByState=function(a){var b,c;return b=m.normalizeState(a),c=b.hash,c},m.extractId=function(a){var b,c,d;return c=/(.*)\&_suid=([0-9]+)$/.exec(a),d=c?c[1]||a:a,b=c?String(c[2]||""):"",b||!1},m.isTraditionalAnchor=function(a){var b=!/[\/\?\.]/.test(a);return b},m.extractState=function(a,b){var c=null,d,e;return b=b||!1,d=m.extractId(a),d&&(c=m.getStateById(d)),c||(e=m.getFullUrl(a),d=m.getIdByUrl(e)||!1,d&&(c=m.getStateById(d)),!c&&b&&!m.isTraditionalAnchor(a)&&(c=m.createStateObject(null,null,e))),c},m.getIdByUrl=function(a){var c=m.urlToId[a]||m.store.urlToId[a]||b;return c},m.getLastSavedState=function(){return m.savedStates[m.savedStates.length-1]||b},m.getLastStoredState=function(){return m.storedStates[m.storedStates.length-1]||b},m.hasUrlDuplicate=function(a){var b=!1,c;return c=m.extractState(a.url),b=c&&c.id!==a.id,b},m.storeState=function(a){return m.urlToId[a.url]=a.id,m.storedStates.push(m.cloneObject(a)),a},m.isLastSavedState=function(a){var b=!1,c,d,e;return m.savedStates.length&&(c=a.id,d=m.getLastSavedState(),e=d.id,b=c===e),b},m.saveState=function(a){return m.isLastSavedState(a)?!1:(m.savedStates.push(m.cloneObject(a)),!0)},m.getStateByIndex=function(a){var b=null;return typeof a=="undefined"?b=m.savedStates[m.savedStates.length-1]:a<0?b=m.savedStates[m.savedStates.length+a]:b=m.savedStates[a],b},m.getHash=function(){var a=m.unescapeHash(d.location.hash);return a},m.unescapeString=function(b){var c=b,d;for(;;){d=a.unescape(c);if(d===c)break;c=d}return c},m.unescapeHash=function(a){var b=m.normalizeHash(a);return b=m.unescapeString(b),b},m.normalizeHash=function(a){var b=a.replace(/[^#]*#/,"").replace(/#.*/,"");return b},m.setHash=function(a,b){var c,e,f;return b!==!1&&m.busy()?(m.pushQueue({scope:m,callback:m.setHash,args:arguments,queue:b}),!1):(c=m.escapeHash(a),m.busy(!0),e=m.extractState(a,!0),e&&!m.emulated.pushState?m.pushState(e.data,e.title,e.url,!1):d.location.hash!==c&&(m.bugs.setHash?(f=m.getPageUrl(),m.pushState(null,null,f+"#"+c,!1)):d.location.hash=c),m)},m.escapeHash=function(b){var c=m.normalizeHash(b);return c=a.escape(c),m.bugs.hashEscape||(c=c.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),c},m.getHashByUrl=function(a){var b=String(a).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return b=m.unescapeHash(b),b},m.setTitle=function(a){var b=a.title,c;b||(c=m.getStateByIndex(0),c&&c.url===a.url&&(b=c.title||m.options.initialTitle));try{d.getElementsByTagName("title")[0].innerHTML=b.replace("<","<").replace(">",">").replace(" & "," & ")}catch(e){}return d.title=b,m},m.queues=[],m.busy=function(a){typeof a!="undefined"?m.busy.flag=a:typeof m.busy.flag=="undefined"&&(m.busy.flag=!1);if(!m.busy.flag){h(m.busy.timeout);var b=function(){var a,c,d;if(m.busy.flag)return;for(a=m.queues.length-1;a>=0;--a){c=m.queues[a];if(c.length===0)continue;d=c.shift(),m.fireQueueItem(d),m.busy.timeout=g(b,m.options.busyDelay)}};m.busy.timeout=g(b,m.options.busyDelay)}return m.busy.flag},m.busy.flag=!1,m.fireQueueItem=function(a){return a.callback.apply(a.scope||m,a.args||[])},m.pushQueue=function(a){return m.queues[a.queue||0]=m.queues[a.queue||0]||[],m.queues[a.queue||0].push(a),m},m.queue=function(a,b){return typeof a=="function"&&(a={callback:a}),typeof b!="undefined"&&(a.queue=b),m.busy()?m.pushQueue(a):m.fireQueueItem(a),m},m.clearQueue=function(){return m.busy.flag=!1,m.queues=[],m},m.stateChanged=!1,m.doubleChecker=!1,m.doubleCheckComplete=function(){return m.stateChanged=!0,m.doubleCheckClear(),m},m.doubleCheckClear=function(){return m.doubleChecker&&(h(m.doubleChecker),m.doubleChecker=!1),m},m.doubleCheck=function(a){return m.stateChanged=!1,m.doubleCheckClear(),m.bugs.ieDoubleCheck&&(m.doubleChecker=g(function(){return m.doubleCheckClear(),m.stateChanged||a(),!0},m.options.doubleCheckInterval)),m},m.safariStatePoll=function(){var b=m.extractState(d.location.href),c;if(!m.isLastSavedState(b))c=b;else return;return c||(c=m.createStateObject()),m.Adapter.trigger(a,"popstate"),m},m.back=function(a){return a!==!1&&m.busy()?(m.pushQueue({scope:m,callback:m.back,args:arguments,queue:a}),!1):(m.busy(!0),m.doubleCheck(function(){m.back(!1)}),n.go(-1),!0)},m.forward=function(a){return a!==!1&&m.busy()?(m.pushQueue({scope:m,callback:m.forward,args:arguments,queue:a}),!1):(m.busy(!0),m.doubleCheck(function(){m.forward(!1)}),n.go(1),!0)},m.go=function(a,b){var c;if(a>0)for(c=1;c<=a;++c)m.forward(b);else{if(!(a<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(c=-1;c>=a;--c)m.back(b)}return m};if(m.emulated.pushState){var o=function(){};m.pushState=m.pushState||o,m.replaceState=m.replaceState||o}else m.onPopState=function(b,c){var e=!1,f=!1,g,h;return m.doubleCheckComplete(),g=m.getHash(),g?(h=m.extractState(g||d.location.href,!0),h?m.replaceState(h.data,h.title,h.url,!1):(m.Adapter.trigger(a,"anchorchange"),m.busy(!1)),m.expectedStateId=!1,!1):(e=m.Adapter.extractEventData("state",b,c)||!1,e?f=m.getStateById(e):m.expectedStateId?f=m.getStateById(m.expectedStateId):f=m.extractState(d.location.href),f||(f=m.createStateObject(null,null,d.location.href)),m.expectedStateId=!1,m.isLastSavedState(f)?(m.busy(!1),!1):(m.storeState(f),m.saveState(f),m.setTitle(f),m.Adapter.trigger(a,"statechange"),m.busy(!1),!0))},m.Adapter.bind(a,"popstate",m.onPopState),m.pushState=function(b,c,d,e){if(m.getHashByUrl(d)&&m.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(e!==!1&&m.busy())return m.pushQueue({scope:m,callback:m.pushState,args:arguments,queue:e}),!1;m.busy(!0);var f=m.createStateObject(b,c,d);return m.isLastSavedState(f)?m.busy(!1):(m.storeState(f),m.expectedStateId=f.id,n.pushState(f.id,f.title,f.url),m.Adapter.trigger(a,"popstate")),!0},m.replaceState=function(b,c,d,e){if(m.getHashByUrl(d)&&m.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(e!==!1&&m.busy())return m.pushQueue({scope:m,callback:m.replaceState,args:arguments,queue:e}),!1;m.busy(!0);var f=m.createStateObject(b,c,d);return m.isLastSavedState(f)?m.busy(!1):(m.storeState(f),m.expectedStateId=f.id,n.replaceState(f.id,f.title,f.url),m.Adapter.trigger(a,"popstate")),!0};if(f){try{m.store=k.parse(f.getItem("History.store"))||{}}catch(p){m.store={}}m.normalizeStore()}else m.store={},m.normalizeStore();m.Adapter.bind(a,"beforeunload",m.clearAllIntervals),m.Adapter.bind(a,"unload",m.clearAllIntervals),m.saveState(m.storeState(m.extractState(d.location.href,!0))),f&&(m.onUnload=function(){var a,b;try{a=k.parse(f.getItem("History.store"))||{}}catch(c){a={}}a.idToState=a.idToState||{},a.urlToId=a.urlToId||{},a.stateToId=a.stateToId||{};for(b in m.idToState){if(!m.idToState.hasOwnProperty(b))continue;a.idToState[b]=m.idToState[b]}for(b in m.urlToId){if(!m.urlToId.hasOwnProperty(b))continue;a.urlToId[b]=m.urlToId[b]}for(b in m.stateToId){if(!m.stateToId.hasOwnProperty(b))continue;a.stateToId[b]=m.stateToId[b]}m.store=a,m.normalizeStore(),f.setItem("History.store",k.stringify(a))},m.intervalList.push(i(m.onUnload,m.options.storeInterval)),m.Adapter.bind(a,"beforeunload",m.onUnload),m.Adapter.bind(a,"unload",m.onUnload));if(!m.emulated.pushState){m.bugs.safariPoll&&m.intervalList.push(i(m.safariStatePoll,m.options.safariPollInterval));if(e.vendor==="Apple Computer, Inc."||(e.appCodeName||"")==="Mozilla")m.Adapter.bind(a,"hashchange",function(){m.Adapter.trigger(a,"popstate")}),m.getHash()&&m.Adapter.onDomLoad(function(){m.Adapter.trigger(a,"hashchange")})}},m.init()}(window)
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module ConstructorPages
|
4
|
-
class ApplicationController < ConstructorCore::ApplicationController
|
5
|
-
def self.movable(what)
|
6
|
-
%w{up down}.each {|m| define_method "move_#{m}" do move_to what, params[:id], m.to_sym end}
|
7
|
-
end
|
8
|
-
|
9
|
-
def move_to(what, id, to)
|
10
|
-
from = ('constructor_pages/'+what.to_s).classify.constantize.find(id)
|
11
|
-
to_sibling = to == :up ? from.left_sibling : from.right_sibling
|
12
|
-
|
13
|
-
if not to_sibling.nil? and from.move_possible?(to_sibling)
|
14
|
-
to == :up ? from.move_left : from.move_right
|
15
|
-
end
|
16
|
-
|
17
|
-
redirect_to :back
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,70 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module ConstructorPages
|
4
|
-
class FieldsController < ApplicationController
|
5
|
-
def new
|
6
|
-
@field = Field.new.tap {|f| f.template = Template.find(params[:template_id])}
|
7
|
-
end
|
8
|
-
|
9
|
-
def edit
|
10
|
-
@field = Field.find(params[:id]).tap {|f| f.template = Template.find(params[:template_id])}
|
11
|
-
end
|
12
|
-
|
13
|
-
def create
|
14
|
-
@field = Field.new field_params
|
15
|
-
|
16
|
-
if @field.save
|
17
|
-
redirect_to edit_template_path(@field.template_id), notice: t(:field_success_added, name: @field.name)
|
18
|
-
else
|
19
|
-
render action: :new, template_id: @field.template_id
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def update
|
24
|
-
@field = Field.find params[:id]
|
25
|
-
|
26
|
-
unless @field.type_value == params[:field][:type_value]
|
27
|
-
@field.type_class.where(field_id: @field.id).each do |field|
|
28
|
-
"constructor_pages/types/#{params[:field][:type_value]}_type".classify.constantize.new(
|
29
|
-
field_id: @field.id, page_id: field.page_id).tap {|f|
|
30
|
-
f.value = field.value unless [@field.type_value, params[:field][:type_value]].include?('image') and
|
31
|
-
(@field.type_value == 'string' and field.value.strip == '')
|
32
|
-
f.save; field.destroy
|
33
|
-
}
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
if @field.update field_params
|
38
|
-
redirect_to edit_template_url(@field.template.id), notice: t(:field_success_updated, name: @field.name)
|
39
|
-
else
|
40
|
-
render action: :edit
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def destroy
|
45
|
-
@field = Field.find(params[:id])
|
46
|
-
name, template = @field.name, @field.template.id
|
47
|
-
@field.destroy
|
48
|
-
redirect_to edit_template_url(template), notice: t(:field_success_removed, name: name)
|
49
|
-
end
|
50
|
-
|
51
|
-
%w{up down}.each {|m| define_method "move_#{m}" do move_to m.to_sym end}
|
52
|
-
|
53
|
-
private
|
54
|
-
|
55
|
-
def field_params
|
56
|
-
params.require(:field).permit(
|
57
|
-
:name,
|
58
|
-
:code_name,
|
59
|
-
:template_id,
|
60
|
-
:type_value
|
61
|
-
)
|
62
|
-
end
|
63
|
-
|
64
|
-
def move_to(to)
|
65
|
-
@field = Field.find(params[:id])
|
66
|
-
to == :up ? @field.move_higher : @field.move_lower
|
67
|
-
redirect_to :back, notice: t(:field_success_moved, name: @field.name)
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
@@ -1,116 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module ConstructorPages
|
4
|
-
class PagesController < ApplicationController
|
5
|
-
layout 'constructor_core/application_core', except: [:show, :search]
|
6
|
-
|
7
|
-
movable :page
|
8
|
-
|
9
|
-
before_filter {@roots, @template_exists = Page.roots, Template.count > 0}
|
10
|
-
|
11
|
-
def index
|
12
|
-
flash.notice = 'Create at least one template' unless @template_exists
|
13
|
-
end
|
14
|
-
|
15
|
-
def new
|
16
|
-
redirect_to pages_path and return unless @template_exists
|
17
|
-
@page, @template_id, @multipart = Page.new, Template.first.id, false
|
18
|
-
@template_id = @page.parent.template.child.id if params[:page] and (@page.parent = Page.find(params[:page]))
|
19
|
-
end
|
20
|
-
|
21
|
-
def show
|
22
|
-
@page = Page.find_by_request_or_first("/#{params[:all]}")
|
23
|
-
error_404 and return if @page.nil? or !@page.active?
|
24
|
-
redirect_to @page.link if @page.redirect?
|
25
|
-
_code_name = @page.template.code_name.to_s
|
26
|
-
instance_variable_set('@'+_code_name, @page)
|
27
|
-
respond_to do |format|
|
28
|
-
format.html { render template: "html_templates/#{_code_name}" }
|
29
|
-
format.json {
|
30
|
-
_template = render_to_string partial: "json_templates/#{_code_name}.json.erb", layout: false, locals: {_code_name.to_sym => @page, page: @page}
|
31
|
-
_js = render_to_string partial: "js_partials/#{_code_name}.js"
|
32
|
-
render json: @page, self_and_ancestors: @page.self_and_ancestors.map(&:id), template: _template.gsub(/\n/, '\\\\n'), js: _js
|
33
|
-
}
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def search
|
38
|
-
@page = Page.find_by_request_or_first("/#{params[:all]}")
|
39
|
-
|
40
|
-
_params = request.query_parameters
|
41
|
-
_params.each_pair {|k,v| v || (_params.delete(k); next)
|
42
|
-
_params[k] = v.numeric? ? v.to_f : (v.to_bool if v.boolean?)}
|
43
|
-
|
44
|
-
@pages = Page.in(@page).by(_params).search(params[:what_search])
|
45
|
-
|
46
|
-
instance_variable_set('@'+@page.template.code_name.pluralize, @pages)
|
47
|
-
instance_variable_set('@'+@page.template.code_name.singularize, @page)
|
48
|
-
render :template => "html_templates/#{@page.template.code_name}_search"
|
49
|
-
end
|
50
|
-
|
51
|
-
def edit
|
52
|
-
@page = Page.find(params[:id])
|
53
|
-
@page.template ||= Template.first
|
54
|
-
@template_id = @page.template.id
|
55
|
-
@multipart = @page.fields.map{|f| f.type_value == 'image'}.include?(true) ? true : false
|
56
|
-
end
|
57
|
-
|
58
|
-
def create
|
59
|
-
@page = Page.new page_params
|
60
|
-
|
61
|
-
if @page.save
|
62
|
-
redirect_to pages.pages_url, notice: t(:page_success_added, name: @page.name)
|
63
|
-
else
|
64
|
-
render action: :new
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
def update
|
69
|
-
@page = Page.find params[:id]
|
70
|
-
|
71
|
-
_template_changed = @page.template.id != params[:page][:template_id].to_i
|
72
|
-
|
73
|
-
@page.remove_fields_values if _template_changed
|
74
|
-
|
75
|
-
if @page.update page_params
|
76
|
-
@page.create_fields_values if _template_changed
|
77
|
-
@page.update_fields_values params[:fields]
|
78
|
-
|
79
|
-
redirect_to pages_url, notice: t(:page_success_updated, name: @page.name)
|
80
|
-
else
|
81
|
-
render action: :edit
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
def destroy
|
86
|
-
@page = Page.find(params[:id])
|
87
|
-
_name = @page.name
|
88
|
-
@page.destroy
|
89
|
-
redirect_to pages_url, notice: t(:page_success_removed, name: _name)
|
90
|
-
end
|
91
|
-
|
92
|
-
private
|
93
|
-
|
94
|
-
def page_params
|
95
|
-
params.require(:page).permit(
|
96
|
-
:active,
|
97
|
-
:name,
|
98
|
-
:url,
|
99
|
-
:title,
|
100
|
-
:keywords,
|
101
|
-
:description,
|
102
|
-
:auto_url,
|
103
|
-
:parent_id,
|
104
|
-
:template_id,
|
105
|
-
:in_nav,
|
106
|
-
:in_map,
|
107
|
-
:in_menu,
|
108
|
-
:link
|
109
|
-
)
|
110
|
-
end
|
111
|
-
|
112
|
-
def error_404
|
113
|
-
render file: "#{Rails.root}/public/404", layout: false, status: 404
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|