From a2d46ca1211b2c5aa9fd8ed2fd0534f8ff2fcffe Mon Sep 17 00:00:00 2001 From: BOHUNG Date: Sat, 28 Sep 2019 19:48:59 +0800 Subject: [PATCH] finish the first version of patch_file --- .gitignore | 8 + Gemfile | 14 + Gemfile.lock | 106 ++ MIT-LICENSE | 20 + README.rdoc | 3 + Rakefile | 32 + app/assets/images/Patchfile/.keep | 0 app/assets/javascripts/admin/patchfiles.js | 2 + app/assets/stylesheets/admin/patchfiles.css | 7 + app/controllers/.keep | 0 .../admin/patchfiles_controller.rb | 158 +++ app/helpers/.keep | 0 app/helpers/admin/patchfiles_helper.rb | 298 +++++ app/mailers/.keep | 0 app/models/.keep | 0 app/models/filefield.rb | 89 ++ app/models/fontfile.rb | 227 ++++ app/models/patchfilefield.rb | 308 +++++ app/views/.keep | 0 .../admin/patchfiles/_approval_modal.html.erb | 122 ++ .../admin/patchfiles/_edit_feed_form.html.erb | 38 + app/views/admin/patchfiles/_feed.html.erb | 51 + .../admin/patchfiles/_feed_form.html.erb | 38 + app/views/admin/patchfiles/_form.html.erb | 472 ++++++++ .../admin/patchfiles/_form_file.html.erb | 69 ++ .../admin/patchfiles/_form_link.html.erb | 26 + app/views/admin/patchfiles/_index.html.erb | 0 app/views/admin/patchfiles/edit.html.erb | 0 .../admin/patchfiles/editckeditor.html.erb | 37 + .../admin/patchfiles/editfontfile.html.erb | 34 + .../admin/patchfiles/excel_format.xlsx.axlsx | 125 ++ .../admin/patchfiles/export_excel.xlsx.axlsx | 177 +++ app/views/admin/patchfiles/feed.html.erb | 124 ++ app/views/admin/patchfiles/import.html.erb | 87 ++ app/views/admin/patchfiles/index.html.erb | 46 + app/views/admin/patchfiles/new.html.erb | 5 + app/views/admin/patchfiles/newfont.html.erb | 0 app/views/admin/patchfiles/settings.html.erb | 150 +++ .../admin/patchfiles/showckeditor.html.erb | 30 + app/views/admin/patchfiles/update.html.erb | 0 app/views/email/announcement_email.html.erb | 1 + .../reapproval_announcement_email.html.erb | 3 + app/views/email/rejection_email.html.erb | 3 + bin/rails | 18 + ckeditor/adapters/jquery.js | 10 + ckeditor/build-config.js | 105 ++ ckeditor/ckeditor.js | 1043 +++++++++++++++++ ckeditor/config.js.erb | 61 + ckeditor/contents.css | 134 +++ ckeditor/lang/en.js | 5 + ckeditor/lang/zh-cn.js | 5 + ckeditor/lang/zh.js | 5 + ckeditor/orbit_templates.js | 40 + ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js | 10 + .../dialogs/lang/_translationstatus.txt | 25 + ckeditor/plugins/a11yhelp/dialogs/lang/ar.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/bg.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/ca.js | 13 + ckeditor/plugins/a11yhelp/dialogs/lang/cs.js | 13 + ckeditor/plugins/a11yhelp/dialogs/lang/cy.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/da.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/de.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/el.js | 13 + .../plugins/a11yhelp/dialogs/lang/en-gb.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/en.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/eo.js | 13 + ckeditor/plugins/a11yhelp/dialogs/lang/es.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/et.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/fa.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/fi.js | 12 + .../plugins/a11yhelp/dialogs/lang/fr-ca.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/fr.js | 13 + ckeditor/plugins/a11yhelp/dialogs/lang/gl.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/gu.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/he.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/hi.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/hr.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/hu.js | 13 + ckeditor/plugins/a11yhelp/dialogs/lang/id.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/it.js | 13 + ckeditor/plugins/a11yhelp/dialogs/lang/ja.js | 9 + ckeditor/plugins/a11yhelp/dialogs/lang/km.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/ko.js | 10 + ckeditor/plugins/a11yhelp/dialogs/lang/ku.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/lt.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/lv.js | 13 + ckeditor/plugins/a11yhelp/dialogs/lang/mk.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/mn.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/nb.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/nl.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/no.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/pl.js | 13 + .../plugins/a11yhelp/dialogs/lang/pt-br.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/pt.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/ro.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/ru.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/si.js | 10 + ckeditor/plugins/a11yhelp/dialogs/lang/sk.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/sl.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/sq.js | 11 + .../plugins/a11yhelp/dialogs/lang/sr-latn.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/sr.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/sv.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/th.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/tr.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/tt.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/ug.js | 11 + ckeditor/plugins/a11yhelp/dialogs/lang/uk.js | 12 + ckeditor/plugins/a11yhelp/dialogs/lang/vi.js | 11 + .../plugins/a11yhelp/dialogs/lang/zh-cn.js | 9 + ckeditor/plugins/a11yhelp/dialogs/lang/zh.js | 10 + ckeditor/plugins/about/dialogs/about.js | 7 + .../about/dialogs/hidpi/logo_ckeditor.png | Bin 0 -> 13339 bytes .../plugins/about/dialogs/logo_ckeditor.png | Bin 0 -> 6757 bytes ckeditor/plugins/clipboard/dialogs/paste.js | 11 + .../plugins/codemirror/css/codemirror.min.css | 1 + .../plugins/codemirror/js/beautify.min.js | 54 + .../codemirror/js/codemirror.addons.min.js | 54 + .../js/codemirror.addons.search.min.js | 17 + .../plugins/codemirror/js/codemirror.min.js | 247 ++++ .../js/codemirror.mode.bbcode.min.js | 4 + .../js/codemirror.mode.bbcodemixed.min.js | 4 + .../js/codemirror.mode.htmlmixed.min.js | 60 + .../js/codemirror.mode.javascript.min.js | 22 + .../codemirror/js/codemirror.mode.php.min.js | 83 ++ .../plugins/codemirror/theme/3024-day.css | 34 + .../plugins/codemirror/theme/3024-night.css | 34 + .../codemirror/theme/ambiance-mobile.css | 5 + .../plugins/codemirror/theme/ambiance.css | 74 ++ .../plugins/codemirror/theme/base16-dark.css | 34 + .../plugins/codemirror/theme/base16-light.css | 34 + .../plugins/codemirror/theme/blackboard.css | 28 + ckeditor/plugins/codemirror/theme/cobalt.css | 21 + ckeditor/plugins/codemirror/theme/eclipse.css | 23 + ckeditor/plugins/codemirror/theme/elegant.css | 13 + .../plugins/codemirror/theme/erlang-dark.css | 30 + .../plugins/codemirror/theme/lesser-dark.css | 43 + ckeditor/plugins/codemirror/theme/mbo.css | 37 + .../plugins/codemirror/theme/mdn-like.css | 44 + .../plugins/codemirror/theme/midnight.css | 43 + ckeditor/plugins/codemirror/theme/monokai.css | 29 + ckeditor/plugins/codemirror/theme/neat.css | 12 + ckeditor/plugins/codemirror/theme/neo.css | 40 + ckeditor/plugins/codemirror/theme/night.css | 24 + .../plugins/codemirror/theme/paraiso-dark.css | 34 + .../codemirror/theme/paraiso-light.css | 34 + .../codemirror/theme/pastel-on-dark.css | 48 + .../plugins/codemirror/theme/rubyblue.css | 21 + .../plugins/codemirror/theme/solarized.css | 167 +++ .../plugins/codemirror/theme/the-matrix.css | 26 + .../theme/tomorrow-night-eighties.css | 34 + .../plugins/codemirror/theme/twilight.css | 28 + .../plugins/codemirror/theme/vibrant-ink.css | 30 + ckeditor/plugins/codemirror/theme/xq-dark.css | 49 + .../plugins/codemirror/theme/xq-light.css | 43 + .../colordialog/dialogs/colordialog.js | 13 + ckeditor/plugins/dialog/dialogDefinition.js | 4 + ckeditor/plugins/div/dialogs/div.js | 9 + ckeditor/plugins/find/dialogs/find.js | 24 + ckeditor/plugins/flash/dialogs/flash.js | 24 + ckeditor/plugins/flash/images/placeholder.png | Bin 0 -> 256 bytes ckeditor/plugins/forms/dialogs/button.js | 8 + ckeditor/plugins/forms/dialogs/checkbox.js | 8 + ckeditor/plugins/forms/dialogs/form.js | 8 + ckeditor/plugins/forms/dialogs/hiddenfield.js | 8 + ckeditor/plugins/forms/dialogs/radio.js | 8 + ckeditor/plugins/forms/dialogs/select.js | 20 + ckeditor/plugins/forms/dialogs/textarea.js | 8 + ckeditor/plugins/forms/dialogs/textfield.js | 10 + ckeditor/plugins/forms/images/hiddenfield.gif | Bin 0 -> 105 bytes ckeditor/plugins/icons.png | Bin 0 -> 22247 bytes ckeditor/plugins/icons_hidpi.png | Bin 0 -> 69397 bytes ckeditor/plugins/iframe/dialogs/iframe.js | 10 + .../plugins/iframe/images/placeholder.png | Bin 0 -> 449 bytes ckeditor/plugins/image/dialogs/image.js | 43 + ckeditor/plugins/image/images/noimage.png | Bin 0 -> 2115 bytes ckeditor/plugins/link/dialogs/anchor.js | 7 + ckeditor/plugins/link/dialogs/link.js | 26 + ckeditor/plugins/link/images/anchor.png | Bin 0 -> 763 bytes ckeditor/plugins/link/images/hidpi/anchor.png | Bin 0 -> 1597 bytes .../plugins/liststyle/dialogs/liststyle.js | 10 + .../plugins/magicline/images/hidpi/icon.png | Bin 0 -> 260 bytes ckeditor/plugins/magicline/images/icon.png | Bin 0 -> 172 bytes .../plugins/pagebreak/images/pagebreak.gif | Bin 0 -> 54 bytes .../plugins/pastefromword/filter/default.js | 31 + ckeditor/plugins/preview/preview.html | 10 + ckeditor/plugins/scayt/LICENSE.md | 28 + ckeditor/plugins/scayt/README.md | 25 + ckeditor/plugins/scayt/dialogs/options.js | 17 + ckeditor/plugins/scayt/dialogs/toolbar.css | 71 ++ .../showblocks/images/block_address.png | Bin 0 -> 171 bytes .../showblocks/images/block_blockquote.png | Bin 0 -> 181 bytes .../plugins/showblocks/images/block_div.png | Bin 0 -> 136 bytes .../plugins/showblocks/images/block_h1.png | Bin 0 -> 127 bytes .../plugins/showblocks/images/block_h2.png | Bin 0 -> 134 bytes .../plugins/showblocks/images/block_h3.png | Bin 0 -> 131 bytes .../plugins/showblocks/images/block_h4.png | Bin 0 -> 133 bytes .../plugins/showblocks/images/block_h5.png | Bin 0 -> 133 bytes .../plugins/showblocks/images/block_h6.png | Bin 0 -> 129 bytes .../plugins/showblocks/images/block_p.png | Bin 0 -> 119 bytes .../plugins/showblocks/images/block_pre.png | Bin 0 -> 136 bytes ckeditor/plugins/smiley/dialogs/smiley.js | 10 + .../plugins/smiley/images/angel_smile.gif | Bin 0 -> 1250 bytes .../plugins/smiley/images/angel_smile.png | Bin 0 -> 1294 bytes .../plugins/smiley/images/angry_smile.gif | Bin 0 -> 1221 bytes .../plugins/smiley/images/angry_smile.png | Bin 0 -> 1351 bytes .../plugins/smiley/images/broken_heart.gif | Bin 0 -> 1131 bytes .../plugins/smiley/images/broken_heart.png | Bin 0 -> 1213 bytes .../plugins/smiley/images/confused_smile.gif | Bin 0 -> 1210 bytes .../plugins/smiley/images/confused_smile.png | Bin 0 -> 1175 bytes ckeditor/plugins/smiley/images/cry_smile.gif | Bin 0 -> 795 bytes ckeditor/plugins/smiley/images/cry_smile.png | Bin 0 -> 1315 bytes .../plugins/smiley/images/devil_smile.gif | Bin 0 -> 1239 bytes .../plugins/smiley/images/devil_smile.png | Bin 0 -> 1299 bytes .../smiley/images/embaressed_smile.gif | Bin 0 -> 790 bytes .../smiley/images/embarrassed_smile.gif | Bin 0 -> 790 bytes .../smiley/images/embarrassed_smile.png | Bin 0 -> 1222 bytes ckeditor/plugins/smiley/images/envelope.gif | Bin 0 -> 712 bytes ckeditor/plugins/smiley/images/envelope.png | Bin 0 -> 1049 bytes ckeditor/plugins/smiley/images/heart.gif | Bin 0 -> 1091 bytes ckeditor/plugins/smiley/images/heart.png | Bin 0 -> 1073 bytes ckeditor/plugins/smiley/images/kiss.gif | Bin 0 -> 1082 bytes ckeditor/plugins/smiley/images/kiss.png | Bin 0 -> 1077 bytes ckeditor/plugins/smiley/images/lightbulb.gif | Bin 0 -> 1062 bytes ckeditor/plugins/smiley/images/lightbulb.png | Bin 0 -> 993 bytes ckeditor/plugins/smiley/images/omg_smile.gif | Bin 0 -> 1207 bytes ckeditor/plugins/smiley/images/omg_smile.png | Bin 0 -> 1196 bytes .../plugins/smiley/images/regular_smile.gif | Bin 0 -> 1216 bytes .../plugins/smiley/images/regular_smile.png | Bin 0 -> 1158 bytes ckeditor/plugins/smiley/images/sad_smile.gif | Bin 0 -> 1199 bytes ckeditor/plugins/smiley/images/sad_smile.png | Bin 0 -> 1189 bytes .../plugins/smiley/images/shades_smile.gif | Bin 0 -> 1234 bytes .../plugins/smiley/images/shades_smile.png | Bin 0 -> 1353 bytes .../plugins/smiley/images/teeth_smile.gif | Bin 0 -> 1210 bytes .../plugins/smiley/images/teeth_smile.png | Bin 0 -> 1257 bytes .../plugins/smiley/images/thumbs_down.gif | Bin 0 -> 1117 bytes .../plugins/smiley/images/thumbs_down.png | Bin 0 -> 1059 bytes ckeditor/plugins/smiley/images/thumbs_up.gif | Bin 0 -> 1112 bytes ckeditor/plugins/smiley/images/thumbs_up.png | Bin 0 -> 1033 bytes .../plugins/smiley/images/tongue_smile.gif | Bin 0 -> 1216 bytes .../plugins/smiley/images/tongue_smile.png | Bin 0 -> 1206 bytes .../plugins/smiley/images/tounge_smile.gif | Bin 0 -> 1216 bytes .../images/whatchutalkingabout_smile.gif | Bin 0 -> 1190 bytes .../images/whatchutalkingabout_smile.png | Bin 0 -> 1113 bytes ckeditor/plugins/smiley/images/wink_smile.gif | Bin 0 -> 1214 bytes ckeditor/plugins/smiley/images/wink_smile.png | Bin 0 -> 1188 bytes .../dialogs/lang/_translationstatus.txt | 20 + .../plugins/specialchar/dialogs/lang/ar.js | 13 + .../plugins/specialchar/dialogs/lang/bg.js | 13 + .../plugins/specialchar/dialogs/lang/ca.js | 14 + .../plugins/specialchar/dialogs/lang/cs.js | 13 + .../plugins/specialchar/dialogs/lang/cy.js | 14 + .../plugins/specialchar/dialogs/lang/de.js | 13 + .../plugins/specialchar/dialogs/lang/el.js | 13 + .../plugins/specialchar/dialogs/lang/en-gb.js | 13 + .../plugins/specialchar/dialogs/lang/en.js | 13 + .../plugins/specialchar/dialogs/lang/eo.js | 12 + .../plugins/specialchar/dialogs/lang/es.js | 13 + .../plugins/specialchar/dialogs/lang/et.js | 13 + .../plugins/specialchar/dialogs/lang/fa.js | 12 + .../plugins/specialchar/dialogs/lang/fi.js | 13 + .../plugins/specialchar/dialogs/lang/fr-ca.js | 10 + .../plugins/specialchar/dialogs/lang/fr.js | 11 + .../plugins/specialchar/dialogs/lang/gl.js | 13 + .../plugins/specialchar/dialogs/lang/he.js | 12 + .../plugins/specialchar/dialogs/lang/hr.js | 13 + .../plugins/specialchar/dialogs/lang/hu.js | 12 + .../plugins/specialchar/dialogs/lang/id.js | 13 + .../plugins/specialchar/dialogs/lang/it.js | 14 + .../plugins/specialchar/dialogs/lang/ja.js | 9 + .../plugins/specialchar/dialogs/lang/km.js | 13 + .../plugins/specialchar/dialogs/lang/ku.js | 13 + .../plugins/specialchar/dialogs/lang/lv.js | 13 + .../plugins/specialchar/dialogs/lang/nb.js | 11 + .../plugins/specialchar/dialogs/lang/nl.js | 13 + .../plugins/specialchar/dialogs/lang/no.js | 11 + .../plugins/specialchar/dialogs/lang/pl.js | 12 + .../plugins/specialchar/dialogs/lang/pt-br.js | 11 + .../plugins/specialchar/dialogs/lang/pt.js | 13 + .../plugins/specialchar/dialogs/lang/ru.js | 13 + .../plugins/specialchar/dialogs/lang/si.js | 13 + .../plugins/specialchar/dialogs/lang/sk.js | 13 + .../plugins/specialchar/dialogs/lang/sl.js | 12 + .../plugins/specialchar/dialogs/lang/sq.js | 13 + .../plugins/specialchar/dialogs/lang/sv.js | 11 + .../plugins/specialchar/dialogs/lang/th.js | 13 + .../plugins/specialchar/dialogs/lang/tr.js | 12 + .../plugins/specialchar/dialogs/lang/tt.js | 13 + .../plugins/specialchar/dialogs/lang/ug.js | 13 + .../plugins/specialchar/dialogs/lang/uk.js | 12 + .../plugins/specialchar/dialogs/lang/vi.js | 14 + .../plugins/specialchar/dialogs/lang/zh-cn.js | 9 + .../plugins/specialchar/dialogs/lang/zh.js | 12 + .../specialchar/dialogs/specialchar.js | 14 + ckeditor/plugins/table/dialogs/table.js | 21 + .../plugins/tabletools/dialogs/tableCell.js | 17 + .../plugins/templates/dialogs/templates.css | 84 ++ .../plugins/templates/dialogs/templates.js | 10 + .../plugins/templates/templates/default.js | 6 + .../templates/templates/images/template1.gif | Bin 0 -> 375 bytes .../templates/templates/images/template2.gif | Bin 0 -> 333 bytes .../templates/templates/images/template3.gif | Bin 0 -> 422 bytes .../templates/templates/images/template4.gif | Bin 0 -> 7570 bytes .../templates/templates/images/template5.gif | Bin 0 -> 6418 bytes .../templates/templates/images/template6.gif | Bin 0 -> 2726 bytes .../templates/templates/images/template7.gif | Bin 0 -> 2479 bytes .../templates/templates/images/template8.gif | Bin 0 -> 2940 bytes ckeditor/plugins/wsc/LICENSE.md | 28 + ckeditor/plugins/wsc/README.md | 25 + ckeditor/plugins/wsc/dialogs/ciframe.html | 66 ++ ckeditor/plugins/wsc/dialogs/tmpFrameset.html | 52 + ckeditor/plugins/wsc/dialogs/wsc.css | 82 ++ ckeditor/plugins/wsc/dialogs/wsc.js | 74 ++ ckeditor/plugins/wsc/dialogs/wsc_ie.js | 11 + ckeditor/plugins/youtube/images/icon.png | Bin 0 -> 419 bytes ckeditor/skins/moono/dialog.css | 5 + ckeditor/skins/moono/dialog_ie.css | 5 + ckeditor/skins/moono/dialog_ie7.css | 5 + ckeditor/skins/moono/dialog_ie8.css | 5 + ckeditor/skins/moono/dialog_iequirks.css | 5 + ckeditor/skins/moono/editor.css | 5 + ckeditor/skins/moono/editor_gecko.css | 5 + ckeditor/skins/moono/editor_ie.css | 5 + ckeditor/skins/moono/editor_ie7.css | 5 + ckeditor/skins/moono/editor_ie8.css | 5 + ckeditor/skins/moono/editor_iequirks.css | 5 + ckeditor/skins/moono/icons.png | Bin 0 -> 22247 bytes ckeditor/skins/moono/icons_hidpi.png | Bin 0 -> 69397 bytes ckeditor/skins/moono/images/arrow.png | Bin 0 -> 261 bytes ckeditor/skins/moono/images/close.png | Bin 0 -> 824 bytes ckeditor/skins/moono/images/hidpi/close.png | Bin 0 -> 1792 bytes .../skins/moono/images/hidpi/lock-open.png | Bin 0 -> 1503 bytes ckeditor/skins/moono/images/hidpi/lock.png | Bin 0 -> 1616 bytes ckeditor/skins/moono/images/hidpi/refresh.png | Bin 0 -> 2320 bytes ckeditor/skins/moono/images/lock-open.png | Bin 0 -> 736 bytes ckeditor/skins/moono/images/lock.png | Bin 0 -> 728 bytes ckeditor/skins/moono/images/refresh.png | Bin 0 -> 953 bytes ckeditor/skins/moono/readme.md | 51 + ckeditor/styles.js | 111 ++ config/locales/en.yml | 99 ++ config/locales/zh_tw.yml | 103 ++ config/members_controller.rb | 430 +++++++ config/routes.rb | 23 + lib/patchfile.rb | 4 + lib/patchfile/engine.rb | 42 + lib/patchfile/version.rb | 3 + lib/tasks/patchfile_tasks.rake | 4 + patchfile.gemspec | 27 + .../admin/patchfiles_controller_test.rb | 14 + test/dummy/README.rdoc | 28 + test/dummy/Rakefile | 6 + test/dummy/app/assets/images/.keep | 0 .../app/assets/javascripts/application.js | 13 + .../app/assets/stylesheets/application.css | 15 + .../app/controllers/application_controller.rb | 5 + test/dummy/app/controllers/concerns/.keep | 0 test/dummy/app/helpers/application_helper.rb | 2 + test/dummy/app/mailers/.keep | 0 test/dummy/app/models/.keep | 0 test/dummy/app/models/concerns/.keep | 0 .../app/views/layouts/application.html.erb | 14 + test/dummy/bin/bundle | 3 + test/dummy/bin/rails | 4 + test/dummy/bin/rake | 4 + test/dummy/config.ru | 4 + test/dummy/config/application.rb | 29 + test/dummy/config/boot.rb | 5 + test/dummy/config/environment.rb | 5 + test/dummy/config/environments/development.rb | 34 + test/dummy/config/environments/production.rb | 80 ++ test/dummy/config/environments/test.rb | 39 + .../initializers/backtrace_silencers.rb | 7 + .../config/initializers/cookies_serializer.rb | 3 + .../initializers/filter_parameter_logging.rb | 4 + test/dummy/config/initializers/inflections.rb | 16 + test/dummy/config/initializers/mime_types.rb | 5 + .../config/initializers/session_store.rb | 3 + .../config/initializers/wrap_parameters.rb | 9 + test/dummy/config/locales/en.yml | 23 + test/dummy/config/routes.rb | 56 + test/dummy/config/secrets.yml | 22 + test/dummy/lib/assets/.keep | 0 test/dummy/log/.keep | 0 test/dummy/public/404.html | 67 ++ test/dummy/public/422.html | 67 ++ test/dummy/public/500.html | 66 ++ test/dummy/public/favicon.ico | 0 test/helpers/admin/patchfiles_helper_test.rb | 4 + test/integration/navigation_test.rb | 9 + test/patchfile_test.rb | 7 + test/test_helper.rb | 15 + updatefiles/admin/members_controller.rb | 821 +++++++++++++ updatefiles/admin/preference.html.erb | 505 ++++++++ updatefiles/application_helper.rb | 646 ++++++++++ updatefiles/config.js.erb | 61 + updatefiles/member_profile.rb | 212 ++++ updatefiles/pages_controller.rb | 737 ++++++++++++ updatefiles/site.rb | 74 ++ 398 files changed, 12910 insertions(+) create mode 100644 .gitignore create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 MIT-LICENSE create mode 100644 README.rdoc create mode 100644 Rakefile create mode 100644 app/assets/images/Patchfile/.keep create mode 100644 app/assets/javascripts/admin/patchfiles.js create mode 100644 app/assets/stylesheets/admin/patchfiles.css create mode 100644 app/controllers/.keep create mode 100644 app/controllers/admin/patchfiles_controller.rb create mode 100644 app/helpers/.keep create mode 100644 app/helpers/admin/patchfiles_helper.rb create mode 100644 app/mailers/.keep create mode 100644 app/models/.keep create mode 100644 app/models/filefield.rb create mode 100644 app/models/fontfile.rb create mode 100644 app/models/patchfilefield.rb create mode 100644 app/views/.keep create mode 100644 app/views/admin/patchfiles/_approval_modal.html.erb create mode 100644 app/views/admin/patchfiles/_edit_feed_form.html.erb create mode 100644 app/views/admin/patchfiles/_feed.html.erb create mode 100644 app/views/admin/patchfiles/_feed_form.html.erb create mode 100644 app/views/admin/patchfiles/_form.html.erb create mode 100644 app/views/admin/patchfiles/_form_file.html.erb create mode 100644 app/views/admin/patchfiles/_form_link.html.erb create mode 100644 app/views/admin/patchfiles/_index.html.erb create mode 100644 app/views/admin/patchfiles/edit.html.erb create mode 100644 app/views/admin/patchfiles/editckeditor.html.erb create mode 100644 app/views/admin/patchfiles/editfontfile.html.erb create mode 100644 app/views/admin/patchfiles/excel_format.xlsx.axlsx create mode 100644 app/views/admin/patchfiles/export_excel.xlsx.axlsx create mode 100644 app/views/admin/patchfiles/feed.html.erb create mode 100644 app/views/admin/patchfiles/import.html.erb create mode 100644 app/views/admin/patchfiles/index.html.erb create mode 100644 app/views/admin/patchfiles/new.html.erb create mode 100644 app/views/admin/patchfiles/newfont.html.erb create mode 100644 app/views/admin/patchfiles/settings.html.erb create mode 100644 app/views/admin/patchfiles/showckeditor.html.erb create mode 100644 app/views/admin/patchfiles/update.html.erb create mode 100644 app/views/email/announcement_email.html.erb create mode 100644 app/views/email/reapproval_announcement_email.html.erb create mode 100644 app/views/email/rejection_email.html.erb create mode 100644 bin/rails create mode 100644 ckeditor/adapters/jquery.js create mode 100644 ckeditor/build-config.js create mode 100644 ckeditor/ckeditor.js create mode 100644 ckeditor/config.js.erb create mode 100644 ckeditor/contents.css create mode 100644 ckeditor/lang/en.js create mode 100644 ckeditor/lang/zh-cn.js create mode 100644 ckeditor/lang/zh.js create mode 100644 ckeditor/orbit_templates.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/ar.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/bg.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/ca.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/cs.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/cy.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/da.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/de.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/el.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/en.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/eo.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/es.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/et.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/fa.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/fi.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/fr.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/gl.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/gu.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/he.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/hi.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/hr.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/hu.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/id.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/it.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/ja.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/km.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/ko.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/ku.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/lt.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/lv.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/mk.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/mn.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/nb.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/nl.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/no.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/pl.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/pt.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/ro.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/ru.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/si.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/sk.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/sl.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/sq.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/sr.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/sv.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/th.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/tr.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/tt.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/ug.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/uk.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/vi.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/lang/zh.js create mode 100644 ckeditor/plugins/about/dialogs/about.js create mode 100644 ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png create mode 100644 ckeditor/plugins/about/dialogs/logo_ckeditor.png create mode 100644 ckeditor/plugins/clipboard/dialogs/paste.js create mode 100644 ckeditor/plugins/codemirror/css/codemirror.min.css create mode 100644 ckeditor/plugins/codemirror/js/beautify.min.js create mode 100644 ckeditor/plugins/codemirror/js/codemirror.addons.min.js create mode 100644 ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js create mode 100644 ckeditor/plugins/codemirror/js/codemirror.min.js create mode 100644 ckeditor/plugins/codemirror/js/codemirror.mode.bbcode.min.js create mode 100644 ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js create mode 100644 ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js create mode 100644 ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js create mode 100644 ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js create mode 100644 ckeditor/plugins/codemirror/theme/3024-day.css create mode 100644 ckeditor/plugins/codemirror/theme/3024-night.css create mode 100644 ckeditor/plugins/codemirror/theme/ambiance-mobile.css create mode 100644 ckeditor/plugins/codemirror/theme/ambiance.css create mode 100644 ckeditor/plugins/codemirror/theme/base16-dark.css create mode 100644 ckeditor/plugins/codemirror/theme/base16-light.css create mode 100644 ckeditor/plugins/codemirror/theme/blackboard.css create mode 100644 ckeditor/plugins/codemirror/theme/cobalt.css create mode 100644 ckeditor/plugins/codemirror/theme/eclipse.css create mode 100644 ckeditor/plugins/codemirror/theme/elegant.css create mode 100644 ckeditor/plugins/codemirror/theme/erlang-dark.css create mode 100644 ckeditor/plugins/codemirror/theme/lesser-dark.css create mode 100644 ckeditor/plugins/codemirror/theme/mbo.css create mode 100644 ckeditor/plugins/codemirror/theme/mdn-like.css create mode 100644 ckeditor/plugins/codemirror/theme/midnight.css create mode 100644 ckeditor/plugins/codemirror/theme/monokai.css create mode 100644 ckeditor/plugins/codemirror/theme/neat.css create mode 100644 ckeditor/plugins/codemirror/theme/neo.css create mode 100644 ckeditor/plugins/codemirror/theme/night.css create mode 100644 ckeditor/plugins/codemirror/theme/paraiso-dark.css create mode 100644 ckeditor/plugins/codemirror/theme/paraiso-light.css create mode 100644 ckeditor/plugins/codemirror/theme/pastel-on-dark.css create mode 100644 ckeditor/plugins/codemirror/theme/rubyblue.css create mode 100644 ckeditor/plugins/codemirror/theme/solarized.css create mode 100644 ckeditor/plugins/codemirror/theme/the-matrix.css create mode 100644 ckeditor/plugins/codemirror/theme/tomorrow-night-eighties.css create mode 100644 ckeditor/plugins/codemirror/theme/twilight.css create mode 100644 ckeditor/plugins/codemirror/theme/vibrant-ink.css create mode 100644 ckeditor/plugins/codemirror/theme/xq-dark.css create mode 100644 ckeditor/plugins/codemirror/theme/xq-light.css create mode 100644 ckeditor/plugins/colordialog/dialogs/colordialog.js create mode 100644 ckeditor/plugins/dialog/dialogDefinition.js create mode 100644 ckeditor/plugins/div/dialogs/div.js create mode 100644 ckeditor/plugins/find/dialogs/find.js create mode 100644 ckeditor/plugins/flash/dialogs/flash.js create mode 100644 ckeditor/plugins/flash/images/placeholder.png create mode 100644 ckeditor/plugins/forms/dialogs/button.js create mode 100644 ckeditor/plugins/forms/dialogs/checkbox.js create mode 100644 ckeditor/plugins/forms/dialogs/form.js create mode 100644 ckeditor/plugins/forms/dialogs/hiddenfield.js create mode 100644 ckeditor/plugins/forms/dialogs/radio.js create mode 100644 ckeditor/plugins/forms/dialogs/select.js create mode 100644 ckeditor/plugins/forms/dialogs/textarea.js create mode 100644 ckeditor/plugins/forms/dialogs/textfield.js create mode 100644 ckeditor/plugins/forms/images/hiddenfield.gif create mode 100644 ckeditor/plugins/icons.png create mode 100644 ckeditor/plugins/icons_hidpi.png create mode 100644 ckeditor/plugins/iframe/dialogs/iframe.js create mode 100644 ckeditor/plugins/iframe/images/placeholder.png create mode 100644 ckeditor/plugins/image/dialogs/image.js create mode 100644 ckeditor/plugins/image/images/noimage.png create mode 100644 ckeditor/plugins/link/dialogs/anchor.js create mode 100644 ckeditor/plugins/link/dialogs/link.js create mode 100644 ckeditor/plugins/link/images/anchor.png create mode 100644 ckeditor/plugins/link/images/hidpi/anchor.png create mode 100644 ckeditor/plugins/liststyle/dialogs/liststyle.js create mode 100644 ckeditor/plugins/magicline/images/hidpi/icon.png create mode 100644 ckeditor/plugins/magicline/images/icon.png create mode 100644 ckeditor/plugins/pagebreak/images/pagebreak.gif create mode 100644 ckeditor/plugins/pastefromword/filter/default.js create mode 100644 ckeditor/plugins/preview/preview.html create mode 100644 ckeditor/plugins/scayt/LICENSE.md create mode 100644 ckeditor/plugins/scayt/README.md create mode 100644 ckeditor/plugins/scayt/dialogs/options.js create mode 100644 ckeditor/plugins/scayt/dialogs/toolbar.css create mode 100644 ckeditor/plugins/showblocks/images/block_address.png create mode 100644 ckeditor/plugins/showblocks/images/block_blockquote.png create mode 100644 ckeditor/plugins/showblocks/images/block_div.png create mode 100644 ckeditor/plugins/showblocks/images/block_h1.png create mode 100644 ckeditor/plugins/showblocks/images/block_h2.png create mode 100644 ckeditor/plugins/showblocks/images/block_h3.png create mode 100644 ckeditor/plugins/showblocks/images/block_h4.png create mode 100644 ckeditor/plugins/showblocks/images/block_h5.png create mode 100644 ckeditor/plugins/showblocks/images/block_h6.png create mode 100644 ckeditor/plugins/showblocks/images/block_p.png create mode 100644 ckeditor/plugins/showblocks/images/block_pre.png create mode 100644 ckeditor/plugins/smiley/dialogs/smiley.js create mode 100644 ckeditor/plugins/smiley/images/angel_smile.gif create mode 100644 ckeditor/plugins/smiley/images/angel_smile.png create mode 100644 ckeditor/plugins/smiley/images/angry_smile.gif create mode 100644 ckeditor/plugins/smiley/images/angry_smile.png create mode 100644 ckeditor/plugins/smiley/images/broken_heart.gif create mode 100644 ckeditor/plugins/smiley/images/broken_heart.png create mode 100644 ckeditor/plugins/smiley/images/confused_smile.gif create mode 100644 ckeditor/plugins/smiley/images/confused_smile.png create mode 100644 ckeditor/plugins/smiley/images/cry_smile.gif create mode 100644 ckeditor/plugins/smiley/images/cry_smile.png create mode 100644 ckeditor/plugins/smiley/images/devil_smile.gif create mode 100644 ckeditor/plugins/smiley/images/devil_smile.png create mode 100644 ckeditor/plugins/smiley/images/embaressed_smile.gif create mode 100644 ckeditor/plugins/smiley/images/embarrassed_smile.gif create mode 100644 ckeditor/plugins/smiley/images/embarrassed_smile.png create mode 100644 ckeditor/plugins/smiley/images/envelope.gif create mode 100644 ckeditor/plugins/smiley/images/envelope.png create mode 100644 ckeditor/plugins/smiley/images/heart.gif create mode 100644 ckeditor/plugins/smiley/images/heart.png create mode 100644 ckeditor/plugins/smiley/images/kiss.gif create mode 100644 ckeditor/plugins/smiley/images/kiss.png create mode 100644 ckeditor/plugins/smiley/images/lightbulb.gif create mode 100644 ckeditor/plugins/smiley/images/lightbulb.png create mode 100644 ckeditor/plugins/smiley/images/omg_smile.gif create mode 100644 ckeditor/plugins/smiley/images/omg_smile.png create mode 100644 ckeditor/plugins/smiley/images/regular_smile.gif create mode 100644 ckeditor/plugins/smiley/images/regular_smile.png create mode 100644 ckeditor/plugins/smiley/images/sad_smile.gif create mode 100644 ckeditor/plugins/smiley/images/sad_smile.png create mode 100644 ckeditor/plugins/smiley/images/shades_smile.gif create mode 100644 ckeditor/plugins/smiley/images/shades_smile.png create mode 100644 ckeditor/plugins/smiley/images/teeth_smile.gif create mode 100644 ckeditor/plugins/smiley/images/teeth_smile.png create mode 100644 ckeditor/plugins/smiley/images/thumbs_down.gif create mode 100644 ckeditor/plugins/smiley/images/thumbs_down.png create mode 100644 ckeditor/plugins/smiley/images/thumbs_up.gif create mode 100644 ckeditor/plugins/smiley/images/thumbs_up.png create mode 100644 ckeditor/plugins/smiley/images/tongue_smile.gif create mode 100644 ckeditor/plugins/smiley/images/tongue_smile.png create mode 100644 ckeditor/plugins/smiley/images/tounge_smile.gif create mode 100644 ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif create mode 100644 ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png create mode 100644 ckeditor/plugins/smiley/images/wink_smile.gif create mode 100644 ckeditor/plugins/smiley/images/wink_smile.png create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/ar.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/bg.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/ca.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/cs.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/cy.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/de.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/el.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/en-gb.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/en.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/eo.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/es.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/et.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/fa.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/fi.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/fr.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/gl.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/he.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/hr.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/hu.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/id.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/it.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/ja.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/km.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/ku.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/lv.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/nb.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/nl.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/no.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/pl.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/pt-br.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/pt.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/ru.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/si.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/sk.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/sl.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/sq.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/sv.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/th.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/tr.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/tt.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/ug.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/uk.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/vi.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js create mode 100644 ckeditor/plugins/specialchar/dialogs/lang/zh.js create mode 100644 ckeditor/plugins/specialchar/dialogs/specialchar.js create mode 100644 ckeditor/plugins/table/dialogs/table.js create mode 100644 ckeditor/plugins/tabletools/dialogs/tableCell.js create mode 100644 ckeditor/plugins/templates/dialogs/templates.css create mode 100644 ckeditor/plugins/templates/dialogs/templates.js create mode 100644 ckeditor/plugins/templates/templates/default.js create mode 100644 ckeditor/plugins/templates/templates/images/template1.gif create mode 100644 ckeditor/plugins/templates/templates/images/template2.gif create mode 100644 ckeditor/plugins/templates/templates/images/template3.gif create mode 100644 ckeditor/plugins/templates/templates/images/template4.gif create mode 100644 ckeditor/plugins/templates/templates/images/template5.gif create mode 100644 ckeditor/plugins/templates/templates/images/template6.gif create mode 100644 ckeditor/plugins/templates/templates/images/template7.gif create mode 100644 ckeditor/plugins/templates/templates/images/template8.gif create mode 100644 ckeditor/plugins/wsc/LICENSE.md create mode 100644 ckeditor/plugins/wsc/README.md create mode 100644 ckeditor/plugins/wsc/dialogs/ciframe.html create mode 100644 ckeditor/plugins/wsc/dialogs/tmpFrameset.html create mode 100644 ckeditor/plugins/wsc/dialogs/wsc.css create mode 100644 ckeditor/plugins/wsc/dialogs/wsc.js create mode 100644 ckeditor/plugins/wsc/dialogs/wsc_ie.js create mode 100644 ckeditor/plugins/youtube/images/icon.png create mode 100644 ckeditor/skins/moono/dialog.css create mode 100644 ckeditor/skins/moono/dialog_ie.css create mode 100644 ckeditor/skins/moono/dialog_ie7.css create mode 100644 ckeditor/skins/moono/dialog_ie8.css create mode 100644 ckeditor/skins/moono/dialog_iequirks.css create mode 100644 ckeditor/skins/moono/editor.css create mode 100644 ckeditor/skins/moono/editor_gecko.css create mode 100644 ckeditor/skins/moono/editor_ie.css create mode 100644 ckeditor/skins/moono/editor_ie7.css create mode 100644 ckeditor/skins/moono/editor_ie8.css create mode 100644 ckeditor/skins/moono/editor_iequirks.css create mode 100644 ckeditor/skins/moono/icons.png create mode 100644 ckeditor/skins/moono/icons_hidpi.png create mode 100644 ckeditor/skins/moono/images/arrow.png create mode 100644 ckeditor/skins/moono/images/close.png create mode 100644 ckeditor/skins/moono/images/hidpi/close.png create mode 100644 ckeditor/skins/moono/images/hidpi/lock-open.png create mode 100644 ckeditor/skins/moono/images/hidpi/lock.png create mode 100644 ckeditor/skins/moono/images/hidpi/refresh.png create mode 100644 ckeditor/skins/moono/images/lock-open.png create mode 100644 ckeditor/skins/moono/images/lock.png create mode 100644 ckeditor/skins/moono/images/refresh.png create mode 100644 ckeditor/skins/moono/readme.md create mode 100644 ckeditor/styles.js create mode 100644 config/locales/en.yml create mode 100644 config/locales/zh_tw.yml create mode 100644 config/members_controller.rb create mode 100644 config/routes.rb create mode 100644 lib/patchfile.rb create mode 100644 lib/patchfile/engine.rb create mode 100644 lib/patchfile/version.rb create mode 100644 lib/tasks/patchfile_tasks.rake create mode 100644 patchfile.gemspec create mode 100644 test/controllers/admin/patchfiles_controller_test.rb create mode 100644 test/dummy/README.rdoc create mode 100644 test/dummy/Rakefile create mode 100644 test/dummy/app/assets/images/.keep create mode 100644 test/dummy/app/assets/javascripts/application.js create mode 100644 test/dummy/app/assets/stylesheets/application.css create mode 100644 test/dummy/app/controllers/application_controller.rb create mode 100644 test/dummy/app/controllers/concerns/.keep create mode 100644 test/dummy/app/helpers/application_helper.rb create mode 100644 test/dummy/app/mailers/.keep create mode 100644 test/dummy/app/models/.keep create mode 100644 test/dummy/app/models/concerns/.keep create mode 100644 test/dummy/app/views/layouts/application.html.erb create mode 100644 test/dummy/bin/bundle create mode 100644 test/dummy/bin/rails create mode 100644 test/dummy/bin/rake create mode 100644 test/dummy/config.ru create mode 100644 test/dummy/config/application.rb create mode 100644 test/dummy/config/boot.rb create mode 100644 test/dummy/config/environment.rb create mode 100644 test/dummy/config/environments/development.rb create mode 100644 test/dummy/config/environments/production.rb create mode 100644 test/dummy/config/environments/test.rb create mode 100644 test/dummy/config/initializers/backtrace_silencers.rb create mode 100644 test/dummy/config/initializers/cookies_serializer.rb create mode 100644 test/dummy/config/initializers/filter_parameter_logging.rb create mode 100644 test/dummy/config/initializers/inflections.rb create mode 100644 test/dummy/config/initializers/mime_types.rb create mode 100644 test/dummy/config/initializers/session_store.rb create mode 100644 test/dummy/config/initializers/wrap_parameters.rb create mode 100644 test/dummy/config/locales/en.yml create mode 100644 test/dummy/config/routes.rb create mode 100644 test/dummy/config/secrets.yml create mode 100644 test/dummy/lib/assets/.keep create mode 100644 test/dummy/log/.keep create mode 100644 test/dummy/public/404.html create mode 100644 test/dummy/public/422.html create mode 100644 test/dummy/public/500.html create mode 100644 test/dummy/public/favicon.ico create mode 100644 test/helpers/admin/patchfiles_helper_test.rb create mode 100644 test/integration/navigation_test.rb create mode 100644 test/patchfile_test.rb create mode 100644 test/test_helper.rb create mode 100644 updatefiles/admin/members_controller.rb create mode 100644 updatefiles/admin/preference.html.erb create mode 100644 updatefiles/application_helper.rb create mode 100644 updatefiles/config.js.erb create mode 100644 updatefiles/member_profile.rb create mode 100644 updatefiles/pages_controller.rb create mode 100644 updatefiles/site.rb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..de5d954 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.bundle/ +log/*.log +pkg/ +test/dummy/db/*.sqlite3 +test/dummy/db/*.sqlite3-journal +test/dummy/log/*.log +test/dummy/tmp/ +test/dummy/.sass-cache diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..d15019e --- /dev/null +++ b/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +# Declare your gem's dependencies in bulletin.gemspec. +# Bundler will treat runtime dependencies like base dependencies, and +# development dependencies will be added by default to the :development group. +gemspec + +# Declare any dependencies that are still in development here instead of in +# your gemspec. These might include edge Rails or gems from your path or +# Git. Remember to move these dependencies to your gemspec before releasing +# your gem to rubygems.org. + +# To use debugger +# gem 'debugger' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..f444ba8 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,106 @@ +PATH + remote: . + specs: + patchfile (0.0.1) + mongoid (= 4.0.0.beta1) + rails (~> 4.1.0.rc2) + +GEM + remote: https://rubygems.org/ + specs: + actionmailer (4.1.0.rc2) + actionpack (= 4.1.0.rc2) + actionview (= 4.1.0.rc2) + mail (~> 2.5.4) + actionpack (4.1.0.rc2) + actionview (= 4.1.0.rc2) + activesupport (= 4.1.0.rc2) + rack (~> 1.5.2) + rack-test (~> 0.6.2) + actionview (4.1.0.rc2) + activesupport (= 4.1.0.rc2) + builder (~> 3.1) + erubis (~> 2.7.0) + activemodel (4.1.0.rc2) + activesupport (= 4.1.0.rc2) + builder (~> 3.1) + activerecord (4.1.0.rc2) + activemodel (= 4.1.0.rc2) + activesupport (= 4.1.0.rc2) + arel (~> 5.0.0) + activesupport (4.1.0.rc2) + i18n (~> 0.6, >= 0.6.9) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.1) + tzinfo (~> 1.1) + arel (5.0.0) + atomic (1.1.16) + bson (2.2.1) + builder (3.2.2) + connection_pool (2.0.0) + erubis (2.7.0) + hike (1.2.3) + i18n (0.6.9) + json (1.8.1) + mail (2.5.4) + mime-types (~> 1.16) + treetop (~> 1.4.8) + mime-types (1.25.1) + minitest (5.3.1) + mongoid (4.0.0.beta1) + activemodel (>= 4.0.0) + moped (~> 2.0.beta6) + origin (~> 2.1) + tzinfo (>= 0.3.37) + moped (2.0.0.rc1) + bson (~> 2.2) + connection_pool (~> 2.0) + optionable (~> 0.2.0) + multi_json (1.9.2) + optionable (0.2.0) + origin (2.1.1) + polyglot (0.3.4) + rack (1.5.2) + rack-test (0.6.2) + rack (>= 1.0) + rails (4.1.0.rc2) + actionmailer (= 4.1.0.rc2) + actionpack (= 4.1.0.rc2) + actionview (= 4.1.0.rc2) + activemodel (= 4.1.0.rc2) + activerecord (= 4.1.0.rc2) + activesupport (= 4.1.0.rc2) + bundler (>= 1.3.0, < 2.0) + railties (= 4.1.0.rc2) + sprockets-rails (~> 2.0.0) + railties (4.1.0.rc2) + actionpack (= 4.1.0.rc2) + activesupport (= 4.1.0.rc2) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (10.2.2) + sprockets (2.12.0) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sprockets-rails (2.0.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (~> 2.8) + thor (0.19.1) + thread_safe (0.3.1) + atomic (>= 1.1.7, < 2) + tilt (1.4.1) + treetop (1.4.15) + polyglot + polyglot (>= 0.3.1) + tzinfo (1.1.0) + thread_safe (~> 0.1) + +PLATFORMS + ruby + +DEPENDENCIES + Patchfile! diff --git a/MIT-LICENSE b/MIT-LICENSE new file mode 100644 index 0000000..ea966ec --- /dev/null +++ b/MIT-LICENSE @@ -0,0 +1,20 @@ +Copyright 2014 YOURNAME + +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: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +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. diff --git a/README.rdoc b/README.rdoc new file mode 100644 index 0000000..fc510d4 --- /dev/null +++ b/README.rdoc @@ -0,0 +1,3 @@ += Patchfile + +This project rocks and uses MIT-LICENSE. \ No newline at end of file diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..a4da62c --- /dev/null +++ b/Rakefile @@ -0,0 +1,32 @@ +begin + require 'bundler/setup' +rescue LoadError + puts 'You must `gem install bundler` and `bundle install` to run rake tasks' +end + +require 'rdoc/task' + +RDoc::Task.new(:rdoc) do |rdoc| + rdoc.rdoc_dir = 'rdoc' + rdoc.title = 'patchfile' + rdoc.options << '--line-numbers' + rdoc.rdoc_files.include('README.rdoc') + rdoc.rdoc_files.include('lib/**/*.rb') +end + + + + +Bundler::GemHelper.install_tasks + +require 'rake/testtask' + +Rake::TestTask.new(:test) do |t| + t.libs << 'lib' + t.libs << 'test' + t.pattern = 'test/**/*_test.rb' + t.verbose = false +end + + +task default: :test diff --git a/app/assets/images/Patchfile/.keep b/app/assets/images/Patchfile/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/assets/javascripts/admin/patchfiles.js b/app/assets/javascripts/admin/patchfiles.js new file mode 100644 index 0000000..dee720f --- /dev/null +++ b/app/assets/javascripts/admin/patchfiles.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/app/assets/stylesheets/admin/patchfiles.css b/app/assets/stylesheets/admin/patchfiles.css new file mode 100644 index 0000000..2c22c38 --- /dev/null +++ b/app/assets/stylesheets/admin/patchfiles.css @@ -0,0 +1,7 @@ +/* + Place all the styles related to the matching controller here. + They will automatically be included in application.css. +*/ +.table .expired{ + color: #BE2E2E; +} \ No newline at end of file diff --git a/app/controllers/.keep b/app/controllers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/controllers/admin/patchfiles_controller.rb b/app/controllers/admin/patchfiles_controller.rb new file mode 100644 index 0000000..9e278c6 --- /dev/null +++ b/app/controllers/admin/patchfiles_controller.rb @@ -0,0 +1,158 @@ +# encoding: utf-8 +require 'rubyXL' +class Admin::PatchfilesController < OrbitAdminController + include Admin::PatchfilesHelper + before_action ->(module_app = @app_title) { set_variables module_app } + before_action :getfont , :create_first_field + #before_action :load_access_levels + def initialize + super + @app_title = "patchfile" + end + + def index + @tags = @module_app.tags + @categories = @module_app.categories.enabled + @filter_fields = filter_fields(@categories, @tags) + @table_fields = [:status, :category, :title, :start_date, :end_date, :last_modified] + #@file_to_show= Filefield.new + #@file_to_show.save + #@file_to_show = Filefield.find().first + #@file_to_show = @file.file_show + if request.xhr? + render :partial => "index" + end + end + def edit + params["filefield"]["file_show"].each_with_index do |(key,value),index| + @key = @file_to_show.file_show.keys[index] + @file_to_show.file_show[@key] = value.to_i + end + @file_to_show.update + redirect_to admin_patchfiles_path + end + def showckeditor + end + def editckeditor + end + def editfontfile + end + def update + if params[:id] == "editfontfile" + @field_name + params["fontfile"]["font_file"] = "" if params["fontfile"]["font_file"].nil? == true + params["fontfile"].each do |update_key,update_value| + if update_key != "font_file" + @font_settings["old_"+update_key] = @font_settings[update_key] rescue nil + @font_settings[update_key] = update_value + else + @file = params["fontfile"]["font_file"] if params["fontfile"]["font_file"] != "" + @file_path = Rails.root.to_s + '/app/assets/fonts' + + if @file.nil? != true + @file_name = @file.original_filename + @file_content = @file.read + @file_content.force_encoding('UTF-8') + Dir.chdir(@file_path) + @filetowrite + if !File.file?(@file_name) + @filetowrite = File.new(@file_name,"w") + else + @filetowrite = File.open(@file_name,"w") + end + @filetowrite.write(@file_content) + @filetowrite.close + Dir.chdir(Rails.root.to_s) + else + @file_name = @font_settings.font_file_name + end + @field_name = {"font_file_name" => @file_name,"font_dir" => @file_path} + @field_name.each do |name,value| + @font_settings["old_" + name.to_s] = @font_settings[name.to_s] + @font_settings[name.to_s] = value.to_s + end + end + end + @font_settings.update + end + redirect_to admin_patchfiles_showckeditor_path + end + def newfont + @field.new_add_font = params["patchfilefield"]["new_add_font"] rescue (redirect_to admin_patchfiles_showckeditor_path and return) + params["patchfilefield"]["font_array"].each_with_index do |(font,istrue),index| + if istrue =="0" + @field.font_array[index.to_s][font] = false + elsif istrue =="1" + @field.font_array[index.to_s][font] = true + end + end + @field.update + redirect_to admin_patchfiles_showckeditor_path + end + def getfont + @ckeditor_path = ENV['PWD'] + '/app/assets/javascripts/ckeditor' + @filedata = File.read(@ckeditor_path+"/config.js.erb") + @name_to_search ="config.font_names" + @index_of_font = @filedata.index(@name_to_search) + @font_str = "" + @end_character + @str_start + @str_end + if @index_of_font != nil + @inex_start_to_search = @index_of_font + @name_to_search.length + @str_start = @inex_start_to_search + if (@filedata[@inex_start_to_search] != "\'" && @filedata[@inex_start_to_search] != "\"") + for @str_start in @inex_start_to_search..@filedata.length + break if (@filedata[@str_start] == "\'" || @filedata[@str_start] == "\"") + end + end + @end_character = @filedata[@str_start] + @str_end = @str_start+1 + if @str_start+1 < @filedata.length + @str_end = @str_start+1 + for @str_end in @str_start+1..@filedata.length + break if @filedata[@str_end] == @end_character || @str_end == @str_start + if @filedata[@str_end] == "=" + @str_end = @str_start + break + end + end + if @str_end != @str_start + @font_str = @filedata[@str_start+1...@str_end] + else + @font_str = "" + end + end + @font_array = @font_str.split("\;") + @font_array.map!{|i| i.strip} + @font_array.delete("") + end + end + def create_first_field + @field + if Patchfilefield.where("title"=>@app_title).take_while{true}.count == 0 + @field = Patchfilefield.new() + @field.title=@app_title + @field.save + @field = Patchfilefield.where("title"=>@app_title).first + else + @field = Patchfilefield.where("title"=>@app_title).first + end + if params[:font] != nil + if Fontfile.where("title"=>params[:font]).first.nil? == true + @font_settings = Fontfile.new + @font_settings.title = params[:font] + @font_settings.save + end + @font_settings = Fontfile.where("title"=>params[:font]).first + end + if Filefield.where("title"=>@app_title).take_while{true}.count == 0 + @file_to_show = Filefield.new() + @file_to_show.title=@app_title + @file_to_show.save + @file_to_show = Filefield.where("title"=>@app_title).first + else + @file_to_show = Filefield.where("title"=>@app_title).first + end + end +end \ No newline at end of file diff --git a/app/helpers/.keep b/app/helpers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/helpers/admin/patchfiles_helper.rb b/app/helpers/admin/patchfiles_helper.rb new file mode 100644 index 0000000..7035d4a --- /dev/null +++ b/app/helpers/admin/patchfiles_helper.rb @@ -0,0 +1,298 @@ +require "net/http" +require "uri" +require 'json' + +module Admin::PatchfilesHelper + def page_for_bulletin(bulletin) + ann_page = nil + pages = Page.where(:module=>'Patchfile') + + pages.each do |page| + if page.categories.count ==1 + if page.categories.include?(bulletin.category.id.to_s) + ann_page = page + end + end + break if !ann_page.nil? + end + + if ann_page.nil? + pages.each do |page| + if page.categories.include?(bulletin.category.id.to_s) + ann_page = page + end + break if !ann_page.nil? + end + end + + ann_page = pages.first if ann_page.nil? + request.protocol+(request.host_with_port+ann_page.url+'/'+bulletin.to_param).gsub('//','/') rescue "/" + end + + def import_this_announcement(row,categories,tags) + value = {} + anns = Bulletin.new + row.cells.each_with_index do |cell,index| + next if cell.nil? + val = cell.value + next if val.nil? || val == "" + case index + when 0 + anns.category = categories[val.to_i] + when 1 + new_tags = [] + if (val.include?(",") rescue false) + ts = val.split(",") + ts.each do |t| + new_tags << tags[t.to_i] + end + else + new_tags << tags[val.to_i] + end + anns.tags=new_tags + when 2 + anns.postdate = val + when 3 + anns.deadline = val + when 4 + anns.is_top = (val.to_i == 1 ? true : false) + when 5 + anns.is_hot = (val.to_i == 1 ? true : false) + when 6 + anns.is_hidden = (val.to_i == 1 ? true : false) + when 7 + anns.remote_image_url = val + when 8 + value["en"] = val + when 9 + value["zh_tw"] = val + anns.image_description_translations = value + value = {} + when 10 + value["en"] = val + when 11 + value["zh_tw"] = val + anns.title_translations = value + value = {} + when 12 + value["en"] = val + when 13 + value["zh_tw"] = val + anns.subtitle_translations = value + value = {} + when 14 + value["en"] = val + when 15 + value["zh_tw"] = val + anns.text_translations = value + value = {} + when 16 + links = val.split(";") rescue [] + desc_en = row.cells[17].value.split(";") rescue [] + desc_zh_tw = row.cells[18].value.split(";") rescue [] + links.each_with_index do |link,i| + bl = BulletinLink.new + bl.url = link.strip + bl.title_translations = {"en" => desc_en[i], "zh_tw" => desc_zh_tw[i]} + bl.bulletin_id = anns.id + bl.save + end + when 19 + files = val.split(";") rescue [] + desc_en = row.cells[20].value.split(";") rescue [] + desc_zh_tw = row.cells[21].value.split(";") rescue [] + alt_en = row.cells[22].value.split(";") rescue [] + alt_zh_tw = row.cells[23].value.split(";") rescue [] + files.each_with_index do |file, i| + bf = BulletinFile.new + bf.remote_file_url = file.strip rescue nil + bf.title_translations = {"en" => (desc_en[i] rescue ""), "zh_tw" => (desc_zh_tw[i] rescue "")} + bf.description_translations = {"en" => (alt_en[i] rescue ""), "zh_tw" => (alt_zh_tw[i] rescue "")} + bf.bulletin_id = anns.id + bf.save + end + end + end + anns.create_user_id = current_user.id.to_s + anns.update_user_id = current_user.id.to_s + anns.approved = true + anns.save + end + + def send_rejection_email(announcement) + user = User.find(announcement.create_user_id) rescue nil + if !user.nil? + email = user.member_profile.email + if !email.nil? && email != "" + url = "http://#{request.host_with_port}/admin/announcements/#{announcement.id}/edit" + datatosend = "

Hello #{user.name},

#{current_user.name} #{t("announcement.rejected_annoucement")} : #{announcement.rejection_reason} #{t("announcement.click_here_to_see")}

" + mail = Email.new(:mail_to => email, :mail_subject => "Announcement rejected公告未通過 : #{announcement.title}.", :template => "email/announcement_email.html.erb", :template_data => {"html" => datatosend}) + mail.deliver rescue nil + end + end + end + + def send_notification_mail_to_managers(announcement, type) + users = [] + if @announcement_setting.email_to.include?("managers") + authorizations = Authorization.where(:module_app_id => @module_app.id) + users = authorizations.collect do |auth| + auth.user + end + end + if @announcement_setting.email_to.include?("admins") + wg = Workgroup.where(:key => "admin").first + admins = User.where(:workgroup_id => wg.id) + users.delete(nil) + users = users.concat(admins.to_a) + end + if @announcement_setting.email_to.include?("approvers") + approvers = User.find(@announcement_setting.approvers).to_a rescue [] + auths = Authorization.where(:category_id => announcement.category_id).collect{|a| a.user} + users = users.concat(approvers & auths) + end + users.each do |user| + email = user.member_profile.email + if !email.nil? && email != "" + send_email(user.name, email, announcement, type) + # sleep(1) + end + end + end + + def send_email(name, useremail, announcement, type) + url = "http://#{request.host_with_port}/admin/announcements?url=#{page_for_bulletin(announcement).sub("http://" + request.host_with_port, "")}&id=#{announcement.id}" + + case type + when "approval" + datatosend = "

#{t("announcement.approval_mail_hi", :name => name)},

#{t("announcement.submitted_new_announcement", :poster => current_user.name)}

#{t("announcement.approval_announcement_title")} : #{announcement.title}
#{t("announcement.click_here_to_see")} : #{url}

" + when "reapproval" + datatosend = "

#{t("announcement.approval_mail_hi", :name => name)},

#{t("announcement.updated_annoucement", :poster => current_user.name)}

#{t("announcement.approval_announcement_title")} : #{announcement.title}
#{t("announcement.click_here_to_see")} : #{url}

" + end + email = Email.new(:mail_to => useremail, :mail_subject => " #{t("announcement.announcement_subject")} : #{announcement.title}.", :template => "email/announcement_email.html.erb", :template_data => {"html" => datatosend}) + email.deliver rescue nil + end + + def download_tmp_xml(url) + xml = File.join(Rails.root, "tmp", "ann_cc_ntu.xml") + open(xml, 'wb') do |fo| + fo.print open(url).read + end + end + + def import_from_tmp_xml(file) + xml = Nokogiri::XML(file) + return if xml.nil? + announcements = [] + xml.xpath("//channel").xpath("//item").each do |anns| + announcements << { + :title => (anns>"title").text, + :category => (anns>"category").text, + :postdate => (anns>"pubDate").text, + :text => (anns>"description").text, + :rss2_sn => (anns>"link").text.split("=").last + } + end + announcements.each do |anns| + ma = ModuleApp.where(:key => "announcement").first + cat = Category.where(:title => anns[:category]).first rescue nil + if cat.nil? + cat = Category.create(:title_translations => {"en" => anns[:category], "zh_tw" => anns[:category]}, :module_app_id => ma.id) + end + ann = Bulletin.where(:rss2_sn => anns[:rss2_sn]).first rescue nil + if ann.nil? + ann = Bulletin.new(:title_translations => {"en" => "", "zh_tw" => anns[:title]}, :postdate => anns[:postdate], :subtitle_translations => {"en" => "", "zh_tw" => anns[:title]}, :text_translations => {"en" => "", "zh_tw" => anns[:text]}, :rss2_sn => anns[:rss2_sn], :category_id => cat.id, :approved => true, :create_user_id => current_user.id) + else + ann.update_attributes(:title_translations => {"en" => "", "zh_tw" => anns[:title]}, :postdate => anns[:postdate], :subtitle_translations => {"en" => "", "zh_tw" => anns[:title]}, :text_translations => {"en" => "", "zh_tw" => anns[:text]}) + end + ann.save + end + File.delete(file) + end + + def import_from_wordpress(xmlfile) + xml_file = File.read(xmlfile) + doc = Nokogiri::XML.parse(xml_file) + + doc.xpath("//channel").each do|channel_data| + channel_data.xpath('//item').each do|itme| + + bu = Bulletin.where(:rss2_sn => itme.xpath('wp:post_id').text ).first rescue nil + if bu.nil? + bu = Bulletin.new + bu.approved = true + bu.rss2_sn = itme.xpath('wp:post_id').text + bu.title_translations = {"en" => itme.xpath('title').text, "zh_tw" => itme.xpath('title').text} + bu.text_translations = {"en" => itme.xpath('content:encoded').text, "zh_tw" => itme.xpath('content:encoded').text} + bu.postdate = itme.xpath('wp:post_date').text + + itme.xpath('category').each do |i_cate| + if i_cate["domain"].to_s == "category" + + cat = @module_app.categories.where(:title => i_cate.text.to_s).first rescue nil + if cat.nil? + cat = Category.new + cat.module_app = @module_app + cat.title_translations = {"en" => i_cate.text.to_s, "zh_tw" => i_cate.text.to_s} + cat.save + end + bu.category = cat + + elsif i_cate["domain"].to_s == "post_tag" + + tag = Tag.where(:name => i_cate.text.to_s ).first rescue nil + if tag.nil? + tag = Tag.new + tag.name_translations = {"en" => i_cate.text.to_s, "zh_tw" => i_cate.text.to_s} + tag.module_app_ids << @module_app.id + tag.save + end + + bu.tags = tag + end + end + + bu.save + end + + end + end + File.delete(xmlfile) + end + + def load_access_level + if (current_user.is_admin? rescue false) + @access_level = "admin" + elsif (current_user.is_manager?(@module_app) rescue false) + @access_level = "manager" + else + @access_level = "users" + end + end + + def user_can_approve?(anns=nil) + can_approve = false + setting = AnnouncementSetting.first + case @access_level + when "admin" + can_approve = true + when "manager" + can_approve = true + else + can_approve = false + end + if !can_approve + if !anns.nil? + if setting.approvers.include?(current_user.id.to_s) + if (current_user.approved_categories_for_module(@module_app).include?(anns.category) rescue false) + can_approve = true + end + end + else + can_approve = setting.approvers.include?(current_user.id.to_s) + end + end + can_approve + end + +end diff --git a/app/mailers/.keep b/app/mailers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/models/.keep b/app/models/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/models/filefield.rb b/app/models/filefield.rb new file mode 100644 index 0000000..e9dfca9 --- /dev/null +++ b/app/models/filefield.rb @@ -0,0 +1,89 @@ +# encoding: utf-8 +require 'fileutils' +class Filefield + + include Mongoid::Document + include Mongoid::Timestamps + + + field :title, :type=> String ,default:"patchfile" + field :file_show, :type=> Hash ,default:{"ckeditor"=>0,"site-preference(two-site-logo)"=>0,"member"=>0} + after_update :updatefile + + + def enabled_for?(lang) + if lang.nil? + return true + else + return self.choose_lang.include?(lang) + end + end + def lastpath dir_path + dir_path = dir_path.gsub('\\','/') + dir_arr= dir_path.split('/') + dir_str='' + dir_arr.delete_at(-1) + dir_arr.each_with_index do |path,index| + dir_str = dir_str + path + if index != dir_arr.count - 1 + dir_str = dir_str +"/" + end + end + return dir_str + end + def updatefile + self.file_show.each do |key,value| + if value == 1 + @model_path = ENV['PWD'] + '/app/models/' + @helper_path = ENV['PWD'] + '/app/helpers/' + @views_path = ENV['PWD'] + '/app/views/' + @controller_path = ENV['PWD'] + '/app/controllers/' + if key == "ckeditor" + app_path = File.expand_path(__dir__) + app_path = lastpath(app_path) + app_path = lastpath(app_path) + @ckeditor_path = ENV['PWD'] + '/app/assets/javascripts/ckeditor/' + puts 'copying CKEDITOR' + @aa = FileUtils.cd(app_path+'/updatefiles/') + puts @aa.to_s + begin + FileUtils.cp('config.js.erb' , @ckeditor_path) + puts @ckeditor_path + rescue + puts 'error copy' + end + elsif key == "site-preference(two-site-logo)" + app_path = File.expand_path(__dir__) + app_path = lastpath(app_path) + app_path = lastpath(app_path) + puts app_path + puts 'copying site' + FileUtils.cd(app_path+'/updatefiles/') + begin + FileUtils.cp('site.rb' , @model_path) + FileUtils.cp('application_helper.rb' , @helper_path) + FileUtils.cd('admin/') + FileUtils.cp('preference.html.erb',@views_path+'/admin/sites/') + rescue + puts 'error copy' + end + elsif key == "member" + app_path = File.expand_path(__dir__) + app_path = lastpath(app_path) + app_path = lastpath(app_path) + FileUtils.cd(app_path+'/updatefiles/') + puts 'copying member' + begin + FileUtils.cp('member_profile.rb' , @model_path) + FileUtils.cd('admin') + FileUtils.cp('members_controller.rb' , @controller_path+'/admin/') + rescue + puts 'error copy' + end + end + FileUtils.cd(Rails.root.to_s) + end + end + end + +end diff --git a/app/models/fontfile.rb b/app/models/fontfile.rb new file mode 100644 index 0000000..043eeb5 --- /dev/null +++ b/app/models/fontfile.rb @@ -0,0 +1,227 @@ +class Fontfile + include Mongoid::Document + include Mongoid::Timestamps + + include OrbitModel::Status + include OrbitModel::Impression + # encoding: utf-8 + include OrbitTag::Taggable + include OrbitCategory::Categorizable + field :title ,type:String ,default:"" + field :is_delete_font_file, type:String,default: 'false' + field :old_title ,type:String ,default:"" + #field :font_file ,type:String ,default:"" + field :font_link ,type:String ,default:"" + field :old_font_link ,type:String ,default:"" + mount_uploader :font_file, AssetUploader + field :font_file_name, type:String ,default:"" + field :font_dir, type:String ,default:"" + field :old_font_file_name, type:String ,default:"" + field :old_font_dir, type:String ,default:"" + scope :can_display, ->{where(:is_hidden=>false,:is_preview => false).any_of({:postdate.lt=>Time.now, :deadline.gt=>Time.now},{:postdate.lt=>Time.now, :deadline=>nil}).order_by([:is_top, :desc],[:postdate, :desc])} + scope :is_approved, ->{where(:approved => true)} + #has_many :filefields, :autosave => true, :dependent => :destroy +# accepts_nested_attributes_for :filefields, :allow_destroy => true + # before_create + #before_update :set_old_link#,:set_old_title + #before_save :set_old_title + #before_create :set_expire + after_update :change_font_name,:set_css_link,:change_font_settings + #after_save :change_font_name + def change_font_settings + if self.old_font_file_name == self.font_file_name && self.is_delete_font_file =='true' + self.font_file_name = "" + self.is_delete_font_file = 'false' + self.save + elsif self.is_delete_font_file =='true' + self.is_delete_font_file = 'false' + end + template_path = ENV['PWD'] + '/app/templates' + all_template = Dir.glob(template_path+'/*/') + all_template.each do |folder| + next if !Dir.exist?(folder+"partial/") + if folder.split('/')[-1] != 'mobile' + begin + Dir.chdir(folder+"partial/") + @file_name = "_head.html.erb" + @filetowrite + if !File.file?(@file_name) + @filetowrite = File.new(@file_name,"w") + @filetowrite.close + end + @file_content = File.read(@file_name) + if self.old_font_dir != '' && self.old_font_file_name != '' && self.old_font_file_name != self.font_file_name + if self.old_font_dir != "" + Dir.chdir(self.old_font_dir) + File.delete(self.old_font_file_name) if File.exist?(self.old_font_file_name) + end + Dir.chdir(folder+"partial/") + @font_link_str = "" + if @file_content.include? @font_link_str + @file_content = @file_content.gsub(@font_link_str,'') + @filetowrite = File.open(@file_name,"w") + @filetowrite.write(@file_content) + @filetowrite.close + end + elsif self.old_font_link != ""&& self.old_font_link != self.font_link + @font_link_str = "" + if @file_content.include? @font_link_str + @file_content = @file_content.gsub(@font_link_str,'') + @filetowrite = File.open(@file_name,"w") + @filetowrite.write(@file_content) + @filetowrite.close + end + end + rescue + puts folder + puts 'error copy' + end + end + end + Dir.chdir(Rails.root.to_s) + end + def set_css_link + template_path = ENV['PWD'] + '/app/templates' + all_template = Dir.glob(template_path+'/*/') + all_template.each do |folder| + next if !Dir.exist?(folder+"partial") + if folder.split('/')[-1] != 'mobile' + begin + Dir.chdir(folder+"partial/") + @file_name = "_head.html.erb" + @filetowrite + if !File.file?(@file_name) + @filetowrite = File.new(@file_name,"w") + @filetowrite.close + end + @file_content = File.read(@file_name) + @file_content = @file_content.force_encoding('UTF-8').gsub('%20',' ') + if self.font_dir != '' && self.font_file_name != '' + @font_link_str = "" + @str_to_search = '/assets/'+ self.font_file_name.to_s + if @file_content.include? @str_to_search + + @str_start = @file_content.index(@str_to_search) + @istrue = 0 + @str_match = 'href'.reverse + @index = 0 + for @i in (0...@str_start.to_i).to_a.reverse + next if @file_content[@i] == ' ' || @file_content[@i] == '=' || @file_content[@i] == '\'' + if @file_content[@i] == @str_match[@index] + @index = @index + 1 + else + break + end + if @index == @str_match.length + @istrue = 1 + break + end + end + if @istrue == 0 + open(@file_name, 'a') { |f| + f.puts @font_link_str + } + end + else + open(@file_name, 'a') { |f| + f.puts @font_link_str + } + end + elsif self.font_link != "" + @font_link_str = "" + @str_to_search = self.font_link.to_s + if @file_content.include? @str_to_search + @str_start = @file_content.index(@str_to_search) + @istrue = 0 + @str_match = 'href'.reverse + @index = 0 + for @i in (0...@str_start).to_a.reverse + next if @file_content[@i] == ' ' || @file_content[@i] == '=' || @file_content[@i] == '\'' + if @file_content[@i] == @str_match[@index] + @index = @index + 1 + else + break + end + if @index == @str_match.length + @istrue = 1 + break + end + end + if @istrue == 0 + open(@file_name, 'a') { |f| + f.puts @font_link_str + } + end + else + open(@file_name, 'a') { |f| + f.puts @font_link_str + } + end + end + rescue + puts folder + puts 'error copy' + end + end + end + end + def change_font_name + if self.old_title !="" && self.old_title != self.title + @field = Patchfilefield.where("title"=>"patchfile").first + @index + @font_old_name + @field.font_array.each do |index,font_hash| + font_hash.each do |font,istrue| + if font == self.old_title + @index = index + @font_old_name = font + break + end + end + break if @index != nil + end + if @font_old_name.nil? == false && @index.nil? == false + @istrue = @field.font_array[@index.to_s][@font_old_name] + @field.font_array[@index.to_s][self.title] = @istrue + @field.font_array[@index.to_s].delete(@font_old_name) + @field.delete_font = @font_old_name + @field.update + @field = Patchfilefield.where("title"=>"patchfile").first + @field.set_un_used_font + @field.set_used_font + @field.update + end + end + end + def email_members + MemberProfile.find(self.email_member_ids) rescue [] + end + + def email_addresses + addresses = self.email_members.collect{|member| member.email} rescue [] + addresses = addresses +[self.other_mailaddress] if !self.other_mailaddress.blank? + addresses.flatten + end + + def email + mail = Email.find(self.email_id) rescue nil + end + + def expired? + (self.deadline < Time.now) rescue false + end + + def destroy_email + mail = Email.find(self.email_id) rescue nil + mail.destroy if !mail.nil? + end + + def self.remove_expired_status + self.where(:is_top => true, :top_end_date.ne => nil, :top_end_date.lt => Time.now).each do |b| + b.is_top = false + b.top_end_date = nil + b.update + end + end + +end diff --git a/app/models/patchfilefield.rb b/app/models/patchfilefield.rb new file mode 100644 index 0000000..349af4c --- /dev/null +++ b/app/models/patchfilefield.rb @@ -0,0 +1,308 @@ +class Patchfilefield + include Mongoid::Document + include Mongoid::Timestamps + include OrbitModel::Status + include OrbitModel::Impression + # encoding: utf-8 + include OrbitTag::Taggable + include OrbitCategory::Categorizable + #include Slug + field :font_array , :type => Hash, default:{} + field :new_add_font, type: String, default:"" + field :delete_font, type: String, default:"" + field :used_font , :type => Array, default:[] + field :un_used_font , :type => Array, default:[] + #field :title, as: :slug_title, type: String, localize: true + field :title ,type:String ,default:"" + field :subtitle, localize: true + field :text, localize: true + #field :create_user_id + #field :update_user_id +# field :public, :type => Boolean, :default => true + #field :postdate , :type => DateTime, :default => Time.now + #field :deadline , :type => DateTime + # field :rss2_sn + #field :approved, :type => Boolean, :default => false + #field :is_preview, :type => Boolean, :default => false + #field :expirable_created_at, type: DateTime + # field :rejected, :type => Boolean, :default => false + #field :reapproval, :type => Boolean, :default => false + # field :rejection_reason + #field :is_external_link, :type => Boolean, :default => false + #field :external_link + #field :email_id + #field :email_sent, :type => Boolean, :default => false + # field :email_sentdate , :type => DateTime + # field :email_member_ids + #field :other_mailaddress + # field :image_description, localize: true +# field :top_end_date, :type => DateTime + # mount_uploader :image, ImageUploader + #has_many :bulletin_links, :autosave => true, :dependent => :destroy + # has_many :bulletin_files, :autosave => true, :dependent => :destroy + + #accepts_nested_attributes_for :bulletin_files, :allow_destroy => true + # accepts_nested_attributes_for :bulletin_links, :allow_destroy => true +# before_destroy :destroy_email + scope :can_display, ->{where(:is_hidden=>false,:is_preview => false).any_of({:postdate.lt=>Time.now, :deadline.gt=>Time.now},{:postdate.lt=>Time.now, :deadline=>nil}).order_by([:is_top, :desc],[:postdate, :desc])} + scope :is_approved, ->{where(:approved => true)} + before_create :get_font_to_store,:set_un_used_font , :set_used_font + before_update :get_font_to_store,:set_un_used_font , :set_used_font + before_save :get_font_to_store,:set_un_used_font , :set_used_font + after_update :set_config + after_save :set_config + #before_create :set_expire + def get_font_to_store + @ckeditor_path = ENV['PWD'] + '/app/assets/javascripts/ckeditor' + @filedata = File.read(@ckeditor_path+"/config.js.erb") + @name_to_search ="config.font_names" + @index_of_font = @filedata.index(@name_to_search) + @font_str = "" + @end_character + if @index_of_font != nil + @inex_start_to_search = @index_of_font + @name_to_search.length + #@str_start = 0 #if @str_start=0 =>not reach the start of font string + @str_start = @inex_start_to_search + if (@filedata[@inex_start_to_search] != "\'" && @filedata[@inex_start_to_search] != "\"") + for @str_start in @inex_start_to_search..@filedata.length + break if (@filedata[@str_start] == "\'" || @filedata[@str_start] == "\"") + end + end + @end_character = @filedata[@str_start] + @str_end = @str_start+1 + if @str_start+1 < @filedata.length + @str_end = @str_start+1 + for @str_end in @str_start+1..@filedata.length + break if @filedata[@str_end] == @end_character || @str_end == @str_start + if @filedata[@str_end] == "=" + @str_end = @str_start + break + end + end + if @str_end != @str_start + @font_str = @filedata[@str_start+1...@str_end] + else + @font_str = "" + end + end + @font_array = @font_str.split("\;") + @font_array.map!{|i| i.strip} + @font_array.delete("") + @font_array.each do |font| + @i = 0 + if font != self.delete_font + self.font_array.values.each do |each_font| + if each_font.keys.first == font + @i = 1 + end + break if @i == 1 + end + if @i == 0 + @count = self.font_array.count + self.font_array = self.font_array.merge({@count =>{font => true}}) + end + end + end + end + if self.new_add_font.strip !="" + @i = 0 + self.font_array.values.each do |each_font| + if each_font.keys.first == self.new_add_font + @i = 1 + end + break if @i == 1 + end + if @i == 0 + @count = self.font_array.count + self.font_array = self.font_array.merge({@count =>{self.new_add_font.strip => true}}) + end + #self.cuurent_used_font push true + self.new_add_font = "" + end + end + # def set_expire + # self.expirable_created_at = Time.now if self.is_preview + # return true + # end + def set_un_used_font + @un_use_font = [] + self.font_array.each do |index,font_hash| + font_hash.each do |font,istrue| + if istrue == false + @un_use_font.push font.strip + end + end + end + self.un_used_font = @un_use_font + end + def set_used_font + @use_font = [] + self.font_array.each do |index,font_hash| + font_hash.each do |font,istrue| + if istrue == true + @use_font.push font.strip + end + end + end + @use_font.delete("") + self.used_font = @use_font + end + def check_font_state + @ckeditor_path = ENV['PWD'] + '/app/assets/javascripts/ckeditor' + @filedata = File.read(@ckeditor_path+"/config.js.erb") + @name_to_search ="config.font_names" + @index_of_font = @filedata.index(@name_to_search) + @font_str = "" + @end_character + @str_start + @str_end + @font_array + if @index_of_font != nil + @inex_start_to_search = @index_of_font + @name_to_search.length + @str_start = @inex_start_to_search + if (@filedata[@inex_start_to_search] != "\'" && @filedata[@inex_start_to_search] != "\"") + for @str_start in @inex_start_to_search..@filedata.length + break if (@filedata[@str_start] == "\'" || @filedata[@str_start] == "\"") + end + end + @end_character = @filedata[@str_start] + @str_end = @str_start+1 + if @str_start+1 < @filedata.length + @str_end = @str_start+1 + for @str_end in @str_start+1..@filedata.length + break if @filedata[@str_end] == @end_character || @str_end == @str_start + if @filedata[@str_end] == "=" + @str_end = @str_start + break + end + end + if @str_end != @str_start + @font_str = @filedata[@str_start+1...@str_end] + else + @font_str = "" + end + end + @font_array = @font_str.split("\;") + @font_array.map!{|i| i.strip} + @font_array.delete("") + if !check_eql_array(@font_array,self.used_font) + return false + else + return true + end + end + end + def set_config + @istrue = check_font_state + if @istrue == false + @delete_font_array = [] + self.un_used_font.each do |font_to_delete| + if @font_array.include? font_to_delete.strip + @delete_font_array.push font_to_delete.strip + end + end + @delete_font_array.push(self.delete_font) if self.delete_font != "" + self.delete_font = "" + puts "111111111111111111111111111111111111111111111111" + puts @delete_font_array + @add_font_array = [] + @use_font = self.used_font rescue [] + @use_font.each do |font_to_add| + if !(@font_array.include? font_to_add.strip) + @add_font_array.push font_to_add.strip + end + end + if @add_font_array != [] || @delete_font_array != [] + @ckeditor_path = ENV['PWD'] + '/app/assets/javascripts/ckeditor' + Dir.chdir(@ckeditor_path) + if !File.file?("config_back.js.erb") + @filetowrite = File.new("config_back.js.erb","w") + if @add_font_array != [] + @add_font_array.each do |new_add_font| + @filedata = @filedata.insert(@str_end,"\;"+new_add_font) + end + end + @delete_font_array.each do |font_to_delete| + @str_above_end = @filedata.index(font_to_delete) - 1 + @str_above_start + for @str_above_start in (0..@str_above_end).to_a.reverse + if @filedata[@str_above_start] =="\'" || @filedata[@str_above_start] =="\"" + break + end + break if @filedata[@str_above_start] == "\;" + end + @str_to_delete = (( @filedata[@str_above_start..@str_above_end].include? "\;") ? @filedata[@str_above_start..@str_above_end] : "")+font_to_delete + @filedata =@filedata.sub(@str_to_delete,"") + for @i in @str_start+1...@str_end + next if @filedata[@i] == " " + break if @filedata[@i] != "\;" + @filedata.slice!(@i) + end + end + puts self.used_font + puts @filedata + #render :html => @delete_font_array.to_s+" "+ @filedata and return + @filetowrite.write(@filedata) + @filetowrite.close + @filetocover = File.open("config.js.erb","w") + @filetocover.write(@filedata) + @filetocover.close + File.delete("config_back.js.erb") + else + @filedata1 = File.read("config.js.erb") + @filedata2 = File.read("config_back.js.erb") + if @filedata1.length < @filedata2.length + @filetocover = File.open("config.js.erb","w") + @filetocover.write(@filedata2) + @filetocover.close + end + File.delete("config_back.js.erb") + end + Dir.chdir(Rails.root.to_s) + end + end + end + def check_eql_array(array1,array2) + if array1.count == array2.count + array1.each do |item| + if !(array2.include? item) + return false + end + end + return true + else + return false + end + end + def update_user + User.find(update_user_id) rescue nil + end + def update_user=(user) + self.update_user_id = user.id + end + def email_members + MemberProfile.find(self.email_member_ids) rescue [] + end + def email_addresses + addresses = self.email_members.collect{|member| member.email} rescue [] + addresses = addresses +[self.other_mailaddress] if !self.other_mailaddress.blank? + addresses.flatten + end + def email + mail = Email.find(self.email_id) rescue nil + end + def expired? + (self.deadline < Time.now) rescue false + end + def destroy_email + mail = Email.find(self.email_id) rescue nil + mail.destroy if !mail.nil? + end + def self.remove_expired_status + self.where(:is_top => true, :top_end_date.ne => nil, :top_end_date.lt => Time.now).each do |b| + b.is_top = false + b.top_end_date = nil + b.save + end + end +end \ No newline at end of file diff --git a/app/views/.keep b/app/views/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/views/admin/patchfiles/_approval_modal.html.erb b/app/views/admin/patchfiles/_approval_modal.html.erb new file mode 100644 index 0000000..2e49a8b --- /dev/null +++ b/app/views/admin/patchfiles/_approval_modal.html.erb @@ -0,0 +1,122 @@ + + \ No newline at end of file diff --git a/app/views/admin/patchfiles/_edit_feed_form.html.erb b/app/views/admin/patchfiles/_edit_feed_form.html.erb new file mode 100644 index 0000000..571b946 --- /dev/null +++ b/app/views/admin/patchfiles/_edit_feed_form.html.erb @@ -0,0 +1,38 @@ +<%= form_for @announcement_feed, url: admin_announcement_updatefeed_path(:id => @announcement_feed.id), html: {class: "form-horizontal main-forms"} do |f| %> +
+ <% @site_in_use_locales.each do |locale| %> + <%= f.fields_for :title_translations do |f| %> +
+ +
+ <%= f.text_field locale, data: {"fv-validation" => "required;","fv-messages" => "Cannot be empty.;"}, value: (@announcement_feed.title_translations[locale.to_s] rescue nil) %> +
+
+ <% end %> + <% end %> +
+
+
+ +
+
+
+<% end %> + + \ No newline at end of file diff --git a/app/views/admin/patchfiles/_feed.html.erb b/app/views/admin/patchfiles/_feed.html.erb new file mode 100644 index 0000000..5db5f4b --- /dev/null +++ b/app/views/admin/patchfiles/_feed.html.erb @@ -0,0 +1,51 @@ + + + <%= feed.title %> +
+ +
+ + +
+
+ +
+
+ + + RSS Feed + + + JSON Feed + + \ No newline at end of file diff --git a/app/views/admin/patchfiles/_feed_form.html.erb b/app/views/admin/patchfiles/_feed_form.html.erb new file mode 100644 index 0000000..e7652eb --- /dev/null +++ b/app/views/admin/patchfiles/_feed_form.html.erb @@ -0,0 +1,38 @@ +<%= form_for @announcement_feed, url: admin_announcement_createfeed_path, html: {class: "form-horizontal main-forms"} do |f| %> +
+ <% @site_in_use_locales.each do |locale| %> + <%= f.fields_for :title_translations do |f| %> +
+ +
+ <%= f.text_field locale, data: {"fv-validation" => "required;","fv-messages" => "Cannot be empty.;"}, value: (@announcement_feed.title_translations[locale.to_s] rescue nil) %> +
+
+ <% end %> + <% end %> +
+ +
+<% end %> + + \ No newline at end of file diff --git a/app/views/admin/patchfiles/_form.html.erb b/app/views/admin/patchfiles/_form.html.erb new file mode 100644 index 0000000..c789e22 --- /dev/null +++ b/app/views/admin/patchfiles/_form.html.erb @@ -0,0 +1,472 @@ +<% content_for :page_specific_css do %> + <%= stylesheet_link_tag "lib/main-forms" %> + <%= stylesheet_link_tag "lib/fileupload" %> + <%= stylesheet_link_tag "lib/main-list" %> +<% end %> +<% content_for :page_specific_javascript do %> + <%= javascript_include_tag "lib/bootstrap-fileupload" %> + <%= javascript_include_tag "lib/bootstrap-datetimepicker" %> + <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %> + <%= javascript_include_tag "lib/file-type" %> + <%= javascript_include_tag "lib/module-area" %> +<% end %> + + +
+ + + + + +
+ + +
+ + +
+ +
+ <%= select_category(f, @module_app) %> +
+
+ + +
+ +
+ <%= f.datetime_picker :postdate, :no_label => true, :new_record => @bulletin.new_record?, :data=>{"picker-type" => "range", "range" => "start"} %> +
+
+ +
+ +
+ <%= f.datetime_picker :deadline, :no_label => true, :new_record => @bulletin.new_record?, :data=>{"picker-type" => "range", "range" => "end"} %> +
+
+ +
+ <%= f.label :is_external_link, t("announcement.is_external_link"), :class => "control-label muted" %> +
+ <%= f.check_box :is_external_link %> +
+
+ + + +
+ + +
+ + +
+ +
+ + + +
+
+ <% if !@bulletin.is_top? && !AnnouncementSetting.check_limit_for_user((@bulletin.new_record? ? current_user.id : @bulletin.create_user_id)) %> + Top limit has been reached. The bulletin wont be marked as top even if you click on it. + <% end %> +
+
+
" data-for="is_top"> + +
+ <%= f.datetime_picker :top_end_date, :no_label => true, :new_record => @bulletin.new_record? %> +
+
+ +
+ <%# end %> + + +
+
+ + <%= select_tags(f, @module_app) %> +
+
+ + +
+ + +
+ +
+
+
+ <% if @bulletin.image.file %> + <%= image_tag @bulletin.image %> + <% else %> + + <% end %> +
+
+ + <%= t(:select_image) %> + <%= t(:change) %> + <%= f.file_field :image %> + + <%= t(:cancel) %> +
+ +
+
+
+
+ <% @site_in_use_locales.each do |locale| %> + <%= f.fields_for :image_description_translations do |f| %> +
+ +
+ <%= f.text_field locale, value: (@bulletin.image_description_translations[locale.to_s] rescue nil) %> +
+
+ <% end %> + <% end %> + +
+ + + +
+ + +
+ +
+ + + +
+ <%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'bulletin[email_member_ids][]', email_members: @bulletin.email_members} %> +
+
+
+
+ +
+
+ <%= "#{t("announcement.other_mailaddress")}(#{t("announcement.other_mailaddress_note")})"%> + <%= f.text_area :other_mailaddress, :class=>"span12", :cols=>"25", :rows=>"10" %> +
+
+
+ +
+
+ +
+ <%= f.datetime_picker :email_sentdate, :no_label => true %> +
+
+
+ + <% if (@bulletin.email.is_sent rescue false) %> +
+
+ +
+ +
+
+
+ <% end %> + +
+ +
+ + + + + + +
+ + <% @site_in_use_locales.each_with_index do |locale, i| %> + +
"> + + +
+ +
+ <%= f.fields_for :title_translations do |f| %> + <%= f.text_field locale, class: "input-block-level", placeholder: t(:title), value: (@bulletin.title_translations[locale] rescue nil) %> + <% end %> +
+
+ + +
+ +
+
+ <%= f.fields_for :subtitle_translations do |f| %> + <%= f.text_area locale, rows: 2, class: "input-block-level", value: (@bulletin.subtitle_translations[locale] rescue nil) %> + <% end %> +
+
+
+ + +
+ +
+
+ <%= f.fields_for :text_translations do |f| %> + <%= f.cktext_area locale, rows: 5, class: "input-block-level", :value => (@bulletin.text_translations[locale] rescue nil) %> + <% end %> +
+
+
+ +
+ + <% end %> + + +
+ +
+ + + <% if @bulletin && !@bulletin.bulletin_links.blank? %> +
+ <% @bulletin.bulletin_links.each_with_index do |bulletin_link, i| %> + <%= f.fields_for :bulletin_links, bulletin_link do |f| %> + <%= render :partial => 'form_link', :object => bulletin_link, :locals => {:f => f, :i => i} %> + <% end %> + <% end %> +
+
+ <% end %> + + +
+
+

+ <%= hidden_field_tag 'bulletin_link_field_count', @bulletin.bulletin_links.count %> + <%= t(:add) %> +

+ +
+
+ + +
+ +
+ + + <% if @bulletin && !@bulletin.bulletin_files.blank? %> +
+ <% @bulletin.bulletin_files.each_with_index do |bulletin_file, i| %> + <%= f.fields_for :bulletin_files, bulletin_file do |f| %> + <%= render :partial => 'form_file', :object => bulletin_file, :locals => {:f => f, :i => i} %> + <% end %> + <% end %> +
+
+ <% end %> + + +
+
+

+ <%= hidden_field_tag 'bulletin_file_field_count', @bulletin.bulletin_files.count %> + <%= t(:add) %> +

+ +
+
+ +
+ +
+ + +
+ <%= get_referer_url[:action] rescue "" %> + <%= f.submit t('submit'), class: 'btn btn-primary' %> + + <%= button_tag t("preview"), id: "button_for_preview", name: "commit", class: 'btn', type: :button %> + <%= link_to t('cancel'), admin_announcements_path, :class=>"btn" %> +
+ + + + +<% if !@module_app.tags.empty? %> + +<% end %> +<% content_for :page_specific_javascript do %> + +<% end %> \ No newline at end of file diff --git a/app/views/admin/patchfiles/_form_file.html.erb b/app/views/admin/patchfiles/_form_file.html.erb new file mode 100644 index 0000000..981ddf4 --- /dev/null +++ b/app/views/admin/patchfiles/_form_file.html.erb @@ -0,0 +1,69 @@ +<% if form_file.new_record? %> +
+<% else %> +
+ <% if form_file.file.blank? %> + <%= t(:no_file) %> + <% else %> + <%= link_to content_tag(:i) + form_file.file_identifier, form_file.file.url, {:class => 'file-link file-type', :target => '_blank', :title => form_file.file_identifier} %> + <% end %> +<% end %> +
+ + + + <% @site_in_use_locales.each_with_index do |locale, i| %> + <%= locale %>"> + <%= f.fields_for :title_translations do |f| %> + <%= f.text_field locale, :class => "input-medium", placeholder: t(:alternative), :value => (form_file.title_translations[locale] rescue nil) %> + <% end %> + + <% end %> + + + + <% @site_in_use_locales.each_with_index do |locale, i| %> + <%= locale %>"> + <%= f.fields_for :description_translations do |f| %> + <%= f.text_field locale, :class => "input-medium", placeholder: t(:description), :value => (form_file.description_translations[locale] rescue nil) %> + <% end %> + + <% end %> + + + + + + <%= hidden_field_tag 'bulletin[bulletin_files_attributes][0][choose_lang][]', '' %> + + <% if form_file.new_record? %> + + + + <% else %> + + <%= f.hidden_field :id %> + + <%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %> + + <% end %> +
+
\ No newline at end of file diff --git a/app/views/admin/patchfiles/_form_link.html.erb b/app/views/admin/patchfiles/_form_link.html.erb new file mode 100644 index 0000000..461a3fc --- /dev/null +++ b/app/views/admin/patchfiles/_form_link.html.erb @@ -0,0 +1,26 @@ +
+ + <%= f.text_field :url, class: "input-large", placeholder: t(:url) %> + + + <% @site_in_use_locales.each_with_index do |locale, i| %> + <%= locale %>"> + <%= f.fields_for :title_translations do |f| %> + <%= f.text_field locale, :class => "input-large", placeholder: t(:url_alt), :value => (form_link.title_translations[locale] rescue nil) %> + <% end %> + + <% end %> + + + <% if form_link.new_record? %> + + + + <% else %> + + <%= f.hidden_field :id %> + + <%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %> + + <% end %> +
diff --git a/app/views/admin/patchfiles/_index.html.erb b/app/views/admin/patchfiles/_index.html.erb new file mode 100644 index 0000000..e69de29 diff --git a/app/views/admin/patchfiles/edit.html.erb b/app/views/admin/patchfiles/edit.html.erb new file mode 100644 index 0000000..e69de29 diff --git a/app/views/admin/patchfiles/editckeditor.html.erb b/app/views/admin/patchfiles/editckeditor.html.erb new file mode 100644 index 0000000..ec0d393 --- /dev/null +++ b/app/views/admin/patchfiles/editckeditor.html.erb @@ -0,0 +1,37 @@ +

CKEDITOR現有字形

+<%=form_for @field,:url=>{:controller=>"patchfiles" ,:action=>"newfont"} do |f|%> +<% @i = 0 %> +
+ <%= f.fields_for :font_array do |fontfield|%> + <% @count = @field.font_array.count %> + <% for @i in 0...@count %> +
+ <% if @field.font_array[@i.to_s].values.first == true%> + <%=fontfield.check_box @field.font_array[@i.to_s].keys.first,{:checked=>true,:id=>"checkbox"+@i.to_s,:style=>"float:left;"} %> + <% else %> + <%=fontfield.check_box @field.font_array[@i.to_s].keys.first,{:id=>"checkbox"+@i.to_s,:style=>"float:left;"} %> + <% end %> + <%=fontfield.label @field.font_array[@i.to_s].keys.first,{:for=>"checkbox"+@i.to_s,:style=>"float:right;"}%> +
+ <%end%> + <%end%> +
+
+
<%=f.text_field :new_add_font,{:id=>"newfont",:placeholder=>t(:newfont)}%>
+<%=f.submit "#{t(:updatefont)}"%> +<%end%> +<%@field.font_array%> + + \ No newline at end of file diff --git a/app/views/admin/patchfiles/editfontfile.html.erb b/app/views/admin/patchfiles/editfontfile.html.erb new file mode 100644 index 0000000..df1982b --- /dev/null +++ b/app/views/admin/patchfiles/editfontfile.html.erb @@ -0,0 +1,34 @@ +<%=form_for @font_settings,{:class=>"form-horizontal",:url=>{:controller=>"patchfiles" ,:action=>"editfontfile",:font=>"#{params[:font]}"}} do |f|%> + <%=f.text_field :title,{:value=>@font_settings.title,:id=>"fontname"}%> +
+ <%=f.text_field :font_link,{:id=>"fonturl"}%> +
+ <% if @font_settings.font_file_name != ""%> + + <%= @font_settings.font_file_name %> + + + <%=f.text_field :is_delete_font_file, {:id=>"hidden-file",:type => "hidden",:value=>@font_settings.is_delete_font_file} %> + <%=f.file_field :font_file,{:id=>"fontfile",:value=>@font_settings.font_file_name,:style=>"display:none;"}%> + <% else %> + <%=f.file_field :font_file,{:id=>"fontfile",:value=>@font_settings.font_file_name}%> + <% end %> +
+ <%=f.submit "#{t(:updatefont)}"%> +<%end%> + \ No newline at end of file diff --git a/app/views/admin/patchfiles/excel_format.xlsx.axlsx b/app/views/admin/patchfiles/excel_format.xlsx.axlsx new file mode 100644 index 0000000..bc4ab8a --- /dev/null +++ b/app/views/admin/patchfiles/excel_format.xlsx.axlsx @@ -0,0 +1,125 @@ +# encoding: utf-8 + +wb = xlsx_package.workbook + +wb.add_worksheet(name: "Annoucement") do |sheet| + + heading = sheet.styles.add_style(:b => true, :locked => true) + example = sheet.styles.add_style(:i => true) + row = [] + row1 = [] + row2 = [] + + row << t("category") + row1 << "select" + t = "" + @module_app.categories.asc(:created_at).each_with_index do |cat,i| + t = t + "#{i}" + " -> " + cat.title + ", " + end + if @module_app.categories.count > 0 + t = t + " Example : 0" + else + t = "Leave this field blank" + end + row2 << t + + row << t("tags") + row1 << "select" + t = "" + @module_app.tags.asc(:created_at).each_with_index do |tag,i| + t = t + "#{i}" + " -> " + tag.name + ", " + end + if @module_app.tags.count > 0 + t = t + " Example : 0,1,2" + else + t = "Leave this field blank" + end + row2 << t + + row << t("start_date") + row1 << "date" + row2 << "Format: YYYY/MM/DD, Example: 2015/12/10" + + row << t("end_date") + row1 << "date" + row2 << "Format: YYYY/MM/DD, Example: 2015/12/12" + + row << t("top") + row1 << "boolean" + row2 << "0 for false, 1 for true" + + row << t("hot") + row1 << "boolean" + row2 << "0 for false, 1 for true" + + row << t("hide") + row1 << "boolean" + row2 << "0 for false, 1 for true " + + row << t("image") + row1 << "url" + row2 << "http://www.example.com/images/example.png" + + row << t("image") + " " + t("description") + " - " + t("en") + row1 << "textfield" + row2 << "" + row << t("image") + " " + t("description") + " - " + t("zh_tw") + row1 << "textfield" + row2 << "" + + row << t("title") + " - " + t("en") + row1 << "textfield" + row2 << "" + row << t("title") + " - " + t("zh_tw") + row1 << "textfield" + row2 << "" + + row << t("subtitle") + " - " + t("en") + row1 << "textarea" + row2 << "" + row << t("subtitle") + " - " + t("zh_tw") + row1 << "textarea" + row2 << "" + + row << t("content") + " - " + t("en") + row1 << "editor" + row2 << "" + row << t("content") + " - " + t("zh_tw") + row1 << "editor" + row2 << "" + + row << t("link") + row1 << "textfield" + row2 << "Seperate with ';'. Example: http://rulingcom.com; http://google.com" + + row << t("link") + " " + t("url_alt") + " - " + t("en") + row1 << "textfield" + row2 << "Seperate with ';' with respective to the links in the link columns. Example : Rulingcom official site; Google search engine" + row << t("link") + " " + t("url_alt") + " - " + t("zh_tw") + row1 << "textfield" + row2 << "Seperate with ';' with respective to the links in the link columns. Example : Rulingcom official site; Google search engine" + + row << t("file_") + row1 << "textfield" + row2 << "Seperate with ';'. Example: http://www.example.com/images/example.png; http://www.example.com/images/example2.png" + + row << t("file_") + " " + t("description") + " - " + t("en") + row1 << "textfield" + row2 << "Seperate with ';' with respective to the links in the link columns. Example : Great view; Nice potrait" + row << t("file_") + " " + t("description") + " - " + t("zh_tw") + row1 << "textfield" + row2 << "Seperate with ';' with respective to the links in the link columns. Example : Great view; Nice potrait" + + row << t("file_") + " " + t("alternative") + " - " + t("en") + row1 << "textfield" + row2 << "Seperate with ';' with respective to the links in the link columns. Example : example1; example2" + row << t("file_") + " " + t("alternative") + " - " + t("zh_tw") + row1 << "textfield" + row2 << "Seperate with ';' with respective to the links in the link columns. Example : example1; example2" + + + sheet.add_row row, :style => heading + sheet.add_row row1 + sheet.add_row row2, :style => example + +end \ No newline at end of file diff --git a/app/views/admin/patchfiles/export_excel.xlsx.axlsx b/app/views/admin/patchfiles/export_excel.xlsx.axlsx new file mode 100644 index 0000000..d2454a2 --- /dev/null +++ b/app/views/admin/patchfiles/export_excel.xlsx.axlsx @@ -0,0 +1,177 @@ +# encoding: utf-8 + +wb = xlsx_package.workbook + +wb.add_worksheet(name: "Annoucement") do |sheet| + + heading = sheet.styles.add_style(:b => true, :locked => true) + example = sheet.styles.add_style(:i => true) + row = [] + row1 = [] + row2 = [] + + row << t("category") + row1 << "select" + t = "" + categories = @module_app.categories.asc(:created_at) + categories.each_with_index do |cat,i| + t = t + "#{i}" + " -> " + cat.title + ", " + end + if categories.count > 0 + t = t + " Example : 0" + else + t = "Leave this field blank" + end + row2 << t + + row << t("tags") + row1 << "select" + t = "" + tags = @module_app.tags.asc(:created_at) + tags.each_with_index do |tag,i| + t = t + "#{i}" + " -> " + tag.name + ", " + end + if tags.count > 0 + t = t + " Example : 0,1,2" + else + t = "Leave this field blank" + end + row2 << t + + row << t("start_date") + row1 << "date" + row2 << "Format: YYYY/MM/DD, Example: 2015/12/10" + + row << t("end_date") + row1 << "date" + row2 << "Format: YYYY/MM/DD, Example: 2015/12/12" + + row << t("top") + row1 << "boolean" + row2 << "0 for false, 1 for true" + + row << t("hot") + row1 << "boolean" + row2 << "0 for false, 1 for true" + + row << t("hide") + row1 << "boolean" + row2 << "0 for false, 1 for true " + + row << t("image") + row1 << "url" + row2 << "http://www.example.com/images/example.png" + + row << t("image") + " " + t("description") + " - " + t("en") + row1 << "textfield" + row2 << "" + row << t("image") + " " + t("description") + " - " + t("zh_tw") + row1 << "textfield" + row2 << "" + + row << t("title") + " - " + t("en") + row1 << "textfield" + row2 << "" + row << t("title") + " - " + t("zh_tw") + row1 << "textfield" + row2 << "" + + row << t("subtitle") + " - " + t("en") + row1 << "textarea" + row2 << "" + row << t("subtitle") + " - " + t("zh_tw") + row1 << "textarea" + row2 << "" + + row << t("content") + " - " + t("en") + row1 << "editor" + row2 << "" + row << t("content") + " - " + t("zh_tw") + row1 << "editor" + row2 << "" + + row << t("link") + row1 << "textfield" + row2 << "Seperate with ';'. Example: http://rulingcom.com; http://google.com" + + row << t("link") + " " + t("url_alt") + " - " + t("en") + row1 << "textfield" + row2 << "Seperate with ';' with respective to the links in the link columns. Example : Rulingcom official site; Google search engine" + row << t("link") + " " + t("url_alt") + " - " + t("zh_tw") + row1 << "textfield" + row2 << "Seperate with ';' with respective to the links in the link columns. Example : Rulingcom official site; Google search engine" + + row << t("file_") + row1 << "textfield" + row2 << "Seperate with ';'. Example: http://www.example.com/images/example.png; http://www.example.com/images/example2.png" + + row << t("file_") + " " + t("description") + " - " + t("en") + row1 << "textfield" + row2 << "Seperate with ';' with respective to the links in the link columns. Example : Great view; Nice potrait" + row << t("file_") + " " + t("description") + " - " + t("zh_tw") + row1 << "textfield" + row2 << "Seperate with ';' with respective to the links in the link columns. Example : Great view; Nice potrait" + + row << t("file_") + " " + t("alternative") + " - " + t("en") + row1 << "textfield" + row2 << "Seperate with ';' with respective to the links in the link columns. Example : example1; example2" + row << t("file_") + " " + t("alternative") + " - " + t("zh_tw") + row1 << "textfield" + row2 << "Seperate with ';' with respective to the links in the link columns. Example : example1; example2" + + + sheet.add_row row, :style => heading + sheet.add_row row1 + sheet.add_row row2, :style => example + + @announcements.each do |anns| + row = [] + row << categories.to_a.index(anns.category) + t = [] + anns.tags.each do |tag| + t << tags.to_a.index(tag) + end + row << t.join(",") + row << (anns.postdate.strftime("%Y/%m/%d") rescue "") + row << (anns.deadline.strftime("%Y/%m/%d") rescue "") + row << (anns.is_top? ? 1 : 0) + row << (anns.is_hot? ? 1 : 0) + row << (anns.is_hidden? ? 1 : 0) + row << ("http://" + request.host_with_port + anns.image.url rescue "") + row << anns.image_description_translations["en"] + row << anns.image_description_translations["zh_tw"] + row << anns.title_translations["en"] + row << anns.title_translations["zh_tw"] + row << anns.subtitle_translations["en"] + row << anns.subtitle_translations["zh_tw"] + row << anns.text_translations["en"] + row << anns.text_translations["zh_tw"] + + links = anns.bulletin_links.asc(:created_at) + t = links.collect{|l|l.url} + row << t.join(";") + t = links.collect{|l|l.title_translations["en"]} + row << t.join(";") + t = links.collect{|l|l.title_translations["zh_tw"]} + row << t.join(";") + + files = anns.bulletin_files.asc(:created_at) + t = files.collect{|f|("http://" + request.host_with_port + f.file.url rescue nil)} + t.delete(nil) + row << t.join(";") + t = files.collect{|l|l.description_translations["en"]} + row << t.join(";") + t = files.collect{|l|l.description_translations["zh_tw"]} + row << t.join(";") + t = files.collect{|l|l.title_translations["en"]} + row << t.join(";") + t = files.collect{|l|l.title_translations["zh_tw"]} + row << t.join(";") + sheet.add_row row + end + + + + + +end \ No newline at end of file diff --git a/app/views/admin/patchfiles/feed.html.erb b/app/views/admin/patchfiles/feed.html.erb new file mode 100644 index 0000000..8380220 --- /dev/null +++ b/app/views/admin/patchfiles/feed.html.erb @@ -0,0 +1,124 @@ +<% content_for :page_specific_css do %> + <%= stylesheet_link_tag("admin/tags") %> +<% end %> +<% content_for :page_specific_javascript do %> + <%= javascript_include_tag "validator" %> +<% end %> + + + + + <% @table_feed_fields.each do |f| %> + <%= thead(f) %> + <% end %> + + + + <%= render :partial => "feed", :collection => @feeds %> + +
+<% if current_user.is_admin? or current_user.is_manager?(@module_app) %> + + + + +<% end %> + + +
\ No newline at end of file diff --git a/app/views/admin/patchfiles/import.html.erb b/app/views/admin/patchfiles/import.html.erb new file mode 100644 index 0000000..00ce443 --- /dev/null +++ b/app/views/admin/patchfiles/import.html.erb @@ -0,0 +1,87 @@ +<% content_for :page_specific_javascript do %> + +<% end %> +
+

<%= t("announcement.export_to_excel") %>

+ +

<%= t("announcement.import_from_excel") %>

+ <%= hidden_field_tag :authenticity_token, form_authenticity_token %> +
+ <% if @module_app.categories.count > 0 %> + +
+ +
+ + <%= t("announcement.please_create_tags_cats") %> +
+
+ <% else %> +
+
+

<%= t("announcement.create_atleast_one_cat") %>

+
+
+ <% end %> +
+ <% if @module_app.categories.count > 0 %> +
+ " class="btn btn-primary"> +
+ <% end %> +
+ + + +
+

<%= t("announcement.import_from_wp_xml") %>

+ <%= hidden_field_tag :authenticity_token, form_authenticity_token %> +
+
+ +
+ +
+
+
+
+ " class="btn btn-primary"> +
+
+ + \ No newline at end of file diff --git a/app/views/admin/patchfiles/index.html.erb b/app/views/admin/patchfiles/index.html.erb new file mode 100644 index 0000000..f0ab86e --- /dev/null +++ b/app/views/admin/patchfiles/index.html.erb @@ -0,0 +1,46 @@ +
+<% @i = 0 %> +<%=form_for @file_to_show ,:url=>{:controller=>"patchfiles" ,:action=>"edit"} do |file|%> + <%= file.fields_for :file_show do |filefield|%> + <% @file_to_show.file_show.each do |show| %> + <%if show[1] == 1%> + <%=filefield.check_box "file_show"+@i.to_s,{:checked=>true,:id=>"checkbox"+@i.to_s,:style=>"float:left;"}%> + <%else%> + <%=filefield.check_box "file_show"+@i.to_s,{:checked=>false,:id=>"checkbox"+@i.to_s,:style=>"float:left;"}%> + <%end%> + <% @i = @i+1 %> + <%=show[0]%> +
+ <%end%> + <%end%> + <%=file.submit "#{t(:updatefont)}"%> +<%end%> +
  • + CKEDITOR現有字形 + <% @ckicktosee_str = (I18n.locale.to_s == "en") ? "click me to see all font which CKEDITOR have now" : "點擊我來查看編輯器所有目前擁有的字形" %> + <%= @ckicktosee_str %> +
      + <% @font_array.each do |font|%> +
    • <%= font %>
    • + <%end%> +
    +
  • + + + \ No newline at end of file diff --git a/app/views/admin/patchfiles/new.html.erb b/app/views/admin/patchfiles/new.html.erb new file mode 100644 index 0000000..9ecaab7 --- /dev/null +++ b/app/views/admin/patchfiles/new.html.erb @@ -0,0 +1,5 @@ +<%= form_for @bulletin, url: admin_announcements_path, html: {class: "form-horizontal main-forms previewable"} do |f| %> +
    + <%= render :partial => 'form', locals: {f: f} %> +
    +<% end %> \ No newline at end of file diff --git a/app/views/admin/patchfiles/newfont.html.erb b/app/views/admin/patchfiles/newfont.html.erb new file mode 100644 index 0000000..e69de29 diff --git a/app/views/admin/patchfiles/settings.html.erb b/app/views/admin/patchfiles/settings.html.erb new file mode 100644 index 0000000..43db706 --- /dev/null +++ b/app/views/admin/patchfiles/settings.html.erb @@ -0,0 +1,150 @@ + +<% + sub_managers = @module_app.sub_managers + sub_managers.delete(nil) +%> +
    <%= t("announcement.click_on_submit") %>
    +<%= form_for @setting, url: (@setting.new_record? ? admin_announcement_createsettings_path : admin_announcement_updatesettings_path), html: {class: "form-horizontal main-forms"} do |f| %> +
    +
    + <%= f.label :top_limit, t("announcement.top_limit"), :class => "control-label muted" %> +
    + <%= f.number_field :top_limit, :min => "0" %> + <%= t("announcement.for_unlimited") %> +
    +
    + <% if AnnouncementSetting.is_pro? %> + <% if !sub_managers.blank? %> +
    + <%= f.label "Approver Setting", :class => "control-label muted" %> +
    + <%= t("announcement.approvers_list") %> + <%= @setting.approvers.count %> +
    +
    + <% else %> + + <% end %> +
    + <%= f.label "Send emails to", :class => "control-label muted" %> +
    + > <%= t("admin") %> + > <%= t("manager") %> + > <%= t("announcement.approver") %> +
    +
    +
    +
    + <% sub_managers.each do |sm| %> + <% if @setting.approvers.include?(sm.id.to_s) %> + + <% end %> + <% end %> +
    +<% end %> +
    + <%= f.submit t('submit'), class: 'btn btn-primary' %> +
    +<% end %> +<% if AnnouncementSetting.is_pro? %> + + +<% end %> + + + + + + + + diff --git a/app/views/admin/patchfiles/showckeditor.html.erb b/app/views/admin/patchfiles/showckeditor.html.erb new file mode 100644 index 0000000..63f1526 --- /dev/null +++ b/app/views/admin/patchfiles/showckeditor.html.erb @@ -0,0 +1,30 @@ +
  • + CKEDITOR現有字形 + <% @ckicktosee_str = (I18n.locale.to_s == "en") ? "click me to see all font which CKEDITOR have now" : "點擊我來查看編輯器所有目前擁有的字形" %> + <%= @ckicktosee_str %> +
      + <% @font_array.each do |font|%> +
    • <%= font %>
    • + <%end%> +
    +
  • +點擊編輯 + + + \ No newline at end of file diff --git a/app/views/admin/patchfiles/update.html.erb b/app/views/admin/patchfiles/update.html.erb new file mode 100644 index 0000000..e69de29 diff --git a/app/views/email/announcement_email.html.erb b/app/views/email/announcement_email.html.erb new file mode 100644 index 0000000..902acf0 --- /dev/null +++ b/app/views/email/announcement_email.html.erb @@ -0,0 +1 @@ +<%= @data["html"].html_safe %> \ No newline at end of file diff --git a/app/views/email/reapproval_announcement_email.html.erb b/app/views/email/reapproval_announcement_email.html.erb new file mode 100644 index 0000000..2e1f89b --- /dev/null +++ b/app/views/email/reapproval_announcement_email.html.erb @@ -0,0 +1,3 @@ +

    Hello <%= @data["name"] %>,

    +

    <%= @data["submitter"] %> <%= t("announcement.updated_annoucement") %> +<%= t("announcement.click_here_to_see") %> \ No newline at end of file diff --git a/app/views/email/rejection_email.html.erb b/app/views/email/rejection_email.html.erb new file mode 100644 index 0000000..187530d --- /dev/null +++ b/app/views/email/rejection_email.html.erb @@ -0,0 +1,3 @@ +

    Hello <%= @data["name"] %>,

    +

    <%= @data["rejector"] %> <%= t("annoucement.rejected_annoucement") %> : <%= @data["reason"].nil? || @data["reason"] == "" ? "" : "#{@data["reason"]}" %>

    +<%= t("announcement.click_here_to_see") %> \ No newline at end of file diff --git a/bin/rails b/bin/rails new file mode 100644 index 0000000..7d6180c --- /dev/null +++ b/bin/rails @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby +# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application. + +ENGINE_ROOT = File.expand_path('../..', __FILE__) +ENGINE_PATH = File.expand_path('../../lib/patchfile/engine', __FILE__) + +# Set up gems listed in the Gemfile. +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) + +# require 'rails/all' +# require 'rails/engine/commands' +require "action_controller/railtie" +require "action_mailer/railtie" +require "sprockets/railtie" +require "rails/test_unit/railtie" +require 'rails/engine/commands' +require "mongoid/railtie" diff --git a/ckeditor/adapters/jquery.js b/ckeditor/adapters/jquery.js new file mode 100644 index 0000000..3ec908b --- /dev/null +++ b/ckeditor/adapters/jquery.js @@ -0,0 +1,10 @@ +/* + Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +(function(a){CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;"undefined"!=typeof a&&(a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a},ckeditor:function(g,d){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g))var k=d,d=g,g=k;var i=[],d=d||{};this.each(function(){var b= +a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,j=new a.Deferred;i.push(j.promise());if(c&&!f)g&&g.apply(c,[this]),j.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),j.resolve()):setTimeout(arguments.callee,100)},0)},null,null,9999);else{if(d.autoUpdateElement||"undefined"==typeof d.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)d.autoUpdateElementJquery=!0;d.autoUpdateElement=!1;b.data("_ckeditorInstanceLock", +!0);c=a(this).is("textarea")?CKEDITOR.replace(h,d):CKEDITOR.inline(h,d);b.data("ckeditorInstance",c);c.on("instanceReady",function(d){var e=d.editor;setTimeout(function(){if(e.element){d.removeListener();e.on("dataReady",function(){b.trigger("dataReady.ckeditor",[e])});e.on("setData",function(a){b.trigger("setData.ckeditor",[e,a.data])});e.on("getData",function(a){b.trigger("getData.ckeditor",[e,a.data])},999);e.on("destroy",function(){b.trigger("destroy.ckeditor",[e])});e.on("save",function(){a(h.form).submit(); +return!1},null,null,20);if(e.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){e.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize",c)})}e.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[e]);g&&g.apply(e,[h]);j.resolve()}else setTimeout(arguments.callee, +100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,i).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}}),CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(d){if(arguments.length){var k=this,i=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(d,function(){f.resolve()});i.push(f.promise()); +return!0}return g.call(b,d)});if(i.length){var b=new a.Deferred;a.when.apply(this,i).done(function(){b.resolveWith(k)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}})))})(window.jQuery); \ No newline at end of file diff --git a/ckeditor/build-config.js b/ckeditor/build-config.js new file mode 100644 index 0000000..7e012be --- /dev/null +++ b/ckeditor/build-config.js @@ -0,0 +1,105 @@ +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ + +/** + * This file was added automatically by CKEditor builder. + * You may re-use it at any time to build CKEditor again. + * + * If you would like to build CKEditor online again + * (for example to upgrade), visit one the following links: + * + * (1) http://ckeditor.com/builder + * Visit online builder to build CKEditor from scratch. + * + * (2) http://ckeditor.com/builder/92360f6882b3ad9983742e54e809dc80 + * Visit online builder to build CKEditor, starting with the same setup as before. + * + * (3) http://ckeditor.com/builder/download/92360f6882b3ad9983742e54e809dc80 + * Straight download link to the latest version of CKEditor (Optimized) with the same setup as before. + * + * NOTE: + * This file is not used by CKEditor, you may remove it. + * Changing this file will not change your CKEditor configuration. + */ + +var CKBUILDER_CONFIG = { + skin: 'moono', + preset: 'full', + ignore: [ + 'dev', + '.gitignore', + '.gitattributes', + 'README.md', + '.mailmap' + ], + plugins : { + 'a11yhelp' : 1, + 'about' : 1, + 'basicstyles' : 1, + 'bidi' : 1, + 'blockquote' : 1, + 'clipboard' : 1, + 'codemirror' : 1, + 'colorbutton' : 1, + 'colordialog' : 1, + 'contextmenu' : 1, + 'dialogadvtab' : 1, + 'div' : 1, + 'elementspath' : 1, + 'enterkey' : 1, + 'entities' : 1, + 'filebrowser' : 1, + 'find' : 1, + 'flash' : 1, + 'floatingspace' : 1, + 'font' : 1, + 'format' : 1, + 'forms' : 1, + 'horizontalrule' : 1, + 'htmlwriter' : 1, + 'iframe' : 1, + 'image' : 1, + 'indentblock' : 1, + 'indentlist' : 1, + 'justify' : 1, + 'language' : 1, + 'link' : 1, + 'list' : 1, + 'liststyle' : 1, + 'magicline' : 1, + 'maximize' : 1, + 'newpage' : 1, + 'pagebreak' : 1, + 'pastefromword' : 1, + 'pastetext' : 1, + 'preview' : 1, + 'print' : 1, + 'removeformat' : 1, + 'resize' : 1, + 'save' : 1, + 'scayt' : 1, + 'selectall' : 1, + 'showblocks' : 1, + 'showborders' : 1, + 'smiley' : 1, + 'sourcearea' : 1, + 'specialchar' : 1, + 'stylescombo' : 1, + 'tab' : 1, + 'table' : 1, + 'tabletools' : 1, + 'templates' : 1, + 'toolbar' : 1, + 'undo' : 1, + 'wsc' : 1, + 'wysiwygarea' : 1, + 'youtube' : 1 + }, + languages : { + 'en' : 1, + 'zh' : 1, + 'zh-cn' : 1 + } +}; \ No newline at end of file diff --git a/ckeditor/ckeditor.js b/ckeditor/ckeditor.js new file mode 100644 index 0000000..4bd9240 --- /dev/null +++ b/ckeditor/ckeditor.js @@ -0,0 +1,1043 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a={timestamp:"E4KA",version:"4.4.1",revision:"568b5ed",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var d=document.getElementsByTagName("script"),f=0;f=0;r--)if(o[r].priority<=n){o.splice(r+1,0,i);return{removeListener:k}}o.unshift(i)}return{removeListener:k}}, +once:function(){var a=arguments[1];arguments[1]=function(d){d.removeListener();return a.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,d=function(){a=1},f=0,b=function(){f=1};return function(n,i,k){var o=e(this)[n],n=a,s=f;a=f=0;if(o){var r=o.listeners;if(r.length)for(var r=r.slice(0),v,g=0;g=0&&f.listeners.splice(b,1)}},removeAllListeners:function(){var a=e(this),d;for(d in a)delete a[d]},hasListeners:function(a){return(a=e(this)[a])&&a.listeners.length>0}}}()); +CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,e,this)},CKEDITOR.editor.prototype.fireOnce=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,e,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); +CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),e={ie:a.indexOf("trident/")>-1,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,f=window.location.hostname;return a!=f&&a!="["+f+"]"},secure:location.protocol== +"https:"};e.gecko=navigator.product=="Gecko"&&!e.webkit&&!e.ie;if(e.webkit)a.indexOf("chrome")>-1?e.chrome=true:e.safari=true;var b=0;if(e.ie){b=e.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;e.ie9Compat=b==9;e.ie8Compat=b==8;e.ie7Compat=b==7;e.ie6Compat=b<7||e.quirks}if(e.gecko){var c=a.match(/rv:([\d\.]+)/);if(c){c=c[1].split(".");b=c[0]*1E4+(c[1]||0)*100+(c[2]||0)*1}}e.air&&(b=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));e.webkit&&(b=parseFloat(a.match(/ applewebkit\/(\d+)/)[1])); +e.version=b;e.isCompatible=e.iOS&&b>=534||!e.mobile&&(e.ie&&b>6||e.gecko&&b>=2E4||e.air&&b>=1||e.webkit&&b>=522||false);e.hidpi=window.devicePixelRatio>=2;e.needsBrFiller=e.gecko||e.webkit||e.ie&&b>10;e.needsNbspFiller=e.ie&&b<11;e.cssClass="cke_browser_"+(e.ie?"ie":e.gecko?"gecko":e.webkit?"webkit":"unknown");if(e.quirks)e.cssClass=e.cssClass+" cke_browser_quirks";if(e.ie)e.cssClass=e.cssClass+(" cke_browser_ie"+(e.quirks?"6 cke_browser_iequirks":e.version));if(e.air)e.cssClass=e.cssClass+" cke_browser_air"; +if(e.iOS)e.cssClass=e.cssClass+" cke_browser_ios";if(e.hidpi)e.cssClass=e.cssClass+" cke_hidpi";return e}()); +"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a= +CKEDITOR.loadFullCore,e=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():e&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},e*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={}; +(function(){var a=[],e=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,c=/>/g,d=/"+d+""):f.push('');return f.join("")},htmlEncode:function(a){return(""+a).replace(b, +"&").replace(c,">").replace(d,"<")},htmlDecode:function(a){return a.replace(h,"&").replace(n,">").replace(i,"<")},htmlEncodeAttr:function(a){return a.replace(f,""").replace(d,"<").replace(c,">")},htmlDecodeAttr:function(a){return a.replace(k,'"').replace(i,"<").replace(n,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,d){var f=d(a);f.prototype=a.prototype;return f},setTimeout:function(a, +d,f,b,g){g||(g=window);f||(f=g);return g.setTimeout(function(){b?a.apply(f,[].concat(b)):a.apply(f)},d||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(d){return d.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(d){return d.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(d){return d.replace(a,"")}}(),indexOf:function(a,d){if(typeof d=="function")for(var f=0,b=a.length;f=0?a[f]:null},bind:function(a,d){return function(){return a.apply(d,arguments)}},createClass:function(a){var d=a.$,f=a.base,b=a.privates||a._,g=a.proto,a=a.statics;!d&&(d=function(){f&&this.base.apply(this,arguments)});if(b)var e=d,d=function(){var a=this._||(this._={}),d;for(d in b){var g=b[d];a[d]=typeof g=="function"?CKEDITOR.tools.bind(g,this):g}e.apply(this,arguments)};if(f){d.prototype= +this.prototypedCopy(f.prototype);d.prototype.constructor=d;d.base=f;d.baseProto=f.prototype;d.prototype.base=function(){this.base=f.prototype.base;f.apply(this,arguments);this.base=arguments.callee}}g&&this.extend(d.prototype,g,true);a&&this.extend(d,a,true);return d},addFunction:function(d,f){return a.push(function(){return d.apply(f||this,arguments)})-1},removeFunction:function(d){a[d]=null},callFunction:function(d){var f=a[d];return f&&f.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a= +/^-?\d+\.?\d*px$/,d;return function(f){d=CKEDITOR.tools.trim(f+"")+"px";return a.test(d)?d:f||""}}(),convertToPx:function(){var a;return function(d){if(!a){a=CKEDITOR.dom.element.createFromHtml('
    ',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(d)){a.setStyle("width",d);return a.$.clientWidth}return d}}(),repeat:function(a,d){return Array(d+1).join(a)},tryThese:function(){for(var a, +d=0,f=arguments.length;d8)&&e)a=e+":"+a;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a= +a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),true)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*]*?>)|^/i,'$&\n diff --git a/ckeditor/plugins/scayt/LICENSE.md b/ckeditor/plugins/scayt/LICENSE.md new file mode 100644 index 0000000..610c807 --- /dev/null +++ b/ckeditor/plugins/scayt/LICENSE.md @@ -0,0 +1,28 @@ +Software License Agreement +========================== + +**CKEditor SCAYT Plugin** +Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved. + +Licensed under the terms of any of the following licenses at your choice: + +* GNU General Public License Version 2 or later (the "GPL"): + http://www.gnu.org/licenses/gpl.html + +* GNU Lesser General Public License Version 2.1 or later (the "LGPL"): + http://www.gnu.org/licenses/lgpl.html + +* Mozilla Public License Version 1.1 or later (the "MPL"): + http://www.mozilla.org/MPL/MPL-1.1.html + +You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. + +Sources of Intellectual Property Included in this plugin +-------------------------------------------------------- + +Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission. + +Trademarks +---------- + +CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. diff --git a/ckeditor/plugins/scayt/README.md b/ckeditor/plugins/scayt/README.md new file mode 100644 index 0000000..1b3de25 --- /dev/null +++ b/ckeditor/plugins/scayt/README.md @@ -0,0 +1,25 @@ +CKEditor SCAYT Plugin +===================== + +This plugin brings Spell Check As You Type (SCAYT) into up to CKEditor 4+. + +SCAYT is a "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution. + +Installation +------------ + +1. Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation. +2. Enable the "scayt" plugin in the CKEditor configuration file (config.js): + + config.extraPlugins = 'scayt'; + +That's all. SCAYT will appear on the editor toolbar and will be ready to use. + +License +------- + +Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). + +See LICENSE.md for more information. + +Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/). diff --git a/ckeditor/plugins/scayt/dialogs/options.js b/ckeditor/plugins/scayt/dialogs/options.js new file mode 100644 index 0000000..aec9a1c --- /dev/null +++ b/ckeditor/plugins/scayt/dialogs/options.js @@ -0,0 +1,17 @@ +CKEDITOR.dialog.add("scaytDialog",function(f){var g=f.scayt,k='

    '+g.getLocal("version")+g.getVersion()+"

    "+g.getLocal("text_copyrights")+"

    ",l=CKEDITOR.document,i={isChanged:function(){return null===this.newLang||this.currentLang===this.newLang?!1:!0},currentLang:g.getLang(),newLang:null,reset:function(){this.currentLang=g.getLang();this.newLang=null},id:"lang"},k=[{id:"options",label:g.getLocal("tab_options"),onShow:function(){},elements:[{type:"vbox", +id:"scaytOptions",children:function(){var a=g.getApplicationConfig(),e=[],b={"ignore-all-caps-words":"label_allCaps","ignore-domain-names":"label_ignoreDomainNames","ignore-words-with-mixed-cases":"label_mixedCase","ignore-words-with-numbers":"label_mixedWithDigits"},d;for(d in a){var c={type:"checkbox"};c.id=d;c.label=g.getLocal(b[d]);e.push(c)}return e}(),onShow:function(){this.getChild();for(var a=f.scayt,e=0;e
    ',onShow:function(){var a=f.scayt.getLang();l.getById("scaytLang_"+a).$.checked=!0}}]}]},{id:"dictionaries",label:g.getLocal("tab_dictionaries"), +elements:[{type:"vbox",id:"rightCol_col__left",children:[{type:"html",id:"dictionaryNote",html:""},{type:"text",id:"dictionaryName",label:g.getLocal("label_fieldNameDic")||"Dictionary name",onShow:function(a){var e=a.sender,b=f.scayt;setTimeout(function(){e.getContentElement("dictionaries","dictionaryNote").getElement().setText("");null!=b.getUserDictionaryName()&&""!=b.getUserDictionaryName()&&e.getContentElement("dictionaries","dictionaryName").setValue(b.getUserDictionaryName())},0)}},{type:"hbox", +id:"notExistDic",align:"left",style:"width:auto;",widths:["50%","50%"],children:[{type:"button",id:"createDic",label:g.getLocal("btn_createDic"),title:g.getLocal("btn_createDic"),onClick:function(){var a=this.getDialog(),e=j,b=f.scayt,d=a.getContentElement("dictionaries","dictionaryName").getValue();b.createUserDictionary(d,function(c){c.error||e.toggleDictionaryButtons.call(a,!0);c.dialog=a;c.command="create";c.name=d;f.fire("scaytUserDictionaryAction",c)},function(c){c.dialog=a;c.command="create"; +c.name=d;f.fire("scaytUserDictionaryActionError",c)})}},{type:"button",id:"restoreDic",label:g.getLocal("btn_restoreDic"),title:g.getLocal("btn_restoreDic"),onClick:function(){var a=this.getDialog(),e=f.scayt,b=j,d=a.getContentElement("dictionaries","dictionaryName").getValue();e.restoreUserDictionary(d,function(c){c.dialog=a;c.error||b.toggleDictionaryButtons.call(a,!0);c.command="restore";c.name=d;f.fire("scaytUserDictionaryAction",c)},function(c){c.dialog=a;c.command="restore";c.name=d;f.fire("scaytUserDictionaryActionError", +c)})}}]},{type:"hbox",id:"existDic",align:"left",style:"width:auto;",widths:["50%","50%"],children:[{type:"button",id:"removeDic",label:g.getLocal("btn_deleteDic"),title:g.getLocal("btn_deleteDic"),onClick:function(){var a=this.getDialog(),e=f.scayt,b=j,d=a.getContentElement("dictionaries","dictionaryName"),c=d.getValue();e.removeUserDictionary(c,function(e){d.setValue("");e.error||b.toggleDictionaryButtons.call(a,!1);e.dialog=a;e.command="remove";e.name=c;f.fire("scaytUserDictionaryAction",e)},function(b){b.dialog= +a;b.command="remove";b.name=c;f.fire("scaytUserDictionaryActionError",b)})}},{type:"button",id:"renameDic",label:g.getLocal("btn_renameDic"),title:g.getLocal("btn_renameDic"),onClick:function(){var a=this.getDialog(),e=f.scayt,b=a.getContentElement("dictionaries","dictionaryName").getValue();e.renameUserDictionary(b,function(d){d.dialog=a;d.command="rename";d.name=b;f.fire("scaytUserDictionaryAction",d)},function(d){d.dialog=a;d.command="rename";d.name=b;f.fire("scaytUserDictionaryActionError",d)})}}]}, +{type:"html",id:"dicInfo",html:'
    '+g.getLocal("text_descriptionDic")+"
    "}]}]},{id:"about",label:g.getLocal("tab_about"),elements:[{type:"html",id:"about",style:"margin: 5px 5px;",html:'
    '+k+"
    "}]}];f.on("scaytUserDictionaryAction",function(a){var e=a.data.dialog,b=e.getContentElement("dictionaries","dictionaryNote").getElement(),d=a.editor.scayt,c;void 0===a.data.error?(c=d.getLocal("message_success_"+ +a.data.command+"Dic"),c=c.replace("%s",a.data.name),b.setText(c),SCAYT.$(b.$).css({color:"blue"})):(""===a.data.name?b.setText(d.getLocal("message_info_emptyDic")):(c=d.getLocal("message_error_"+a.data.command+"Dic"),c=c.replace("%s",a.data.name),b.setText(c)),SCAYT.$(b.$).css({color:"red"}),null!=d.getUserDictionaryName()&&""!=d.getUserDictionaryName()?e.getContentElement("dictionaries","dictionaryName").setValue(d.getUserDictionaryName()):e.getContentElement("dictionaries","dictionaryName").setValue(""))}); +f.on("scaytUserDictionaryActionError",function(a){var e=a.data.dialog,b=e.getContentElement("dictionaries","dictionaryNote").getElement(),d=a.editor.scayt,c;""===a.data.name?b.setText(d.getLocal("message_info_emptyDic")):(c=d.getLocal("message_error_"+a.data.command+"Dic"),c=c.replace("%s",a.data.name),b.setText(c));SCAYT.$(b.$).css({color:"red"});null!=d.getUserDictionaryName()&&""!=d.getUserDictionaryName()?e.getContentElement("dictionaries","dictionaryName").setValue(d.getUserDictionaryName()): +e.getContentElement("dictionaries","dictionaryName").setValue("")});var j={title:g.getLocal("text_title"),resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:340,minHeight:260,onLoad:function(){if(0!=f.config.scayt_uiTabs[1]){var a=j,e=a.getLangBoxes.call(this);e.getParent().setStyle("white-space","normal");a.renderLangList(e);this.definition.minWidth=this.getSize().width;this.resize(this.definition.minWidth,this.definition.minHeight)}},onCancel:function(){i.reset()},onHide:function(){f.unlockSelection()}, +onShow:function(){f.fire("scaytDialogShown",this);if(0!=f.config.scayt_uiTabs[2]){var a=f.scayt,e=this.getContentElement("dictionaries","dictionaryName"),b=this.getContentElement("dictionaries","existDic").getElement().getParent(),d=this.getContentElement("dictionaries","notExistDic").getElement().getParent();b.hide();d.hide();null!=a.getUserDictionaryName()&&""!=a.getUserDictionaryName()?(this.getContentElement("dictionaries","dictionaryName").setValue(a.getUserDictionaryName()),b.show()):(e.setValue(""), +d.show())}},onOk:function(){var a=j,e=f.scayt;this.getContentElement("options","scaytOptions");a=a.getChangedOption.call(this);e.commitOption({changedOptions:a})},toggleDictionaryButtons:function(a){var e=this.getContentElement("dictionaries","existDic").getElement().getParent(),b=this.getContentElement("dictionaries","notExistDic").getElement().getParent();a?(e.show(),b.hide()):(e.hide(),b.show())},getChangedOption:function(){var a={};if(1==f.config.scayt_uiTabs[0])for(var e=this.getContentElement("options", +"scaytOptions").getChild(),b=0;b'),g=new CKEDITOR.dom.element("label"),h=f.scayt;b.setStyles({"white-space":"normal",position:"relative"}); +c.on("click",function(a){i.newLang=a.sender.getValue()});g.appendText(a);g.setAttribute("for",d);b.append(c);b.append(g);e===h.getLang()&&(c.setAttribute("checked",!0),c.setAttribute("defaultChecked","defaultChecked"));return b},renderLangList:function(a){var e=a.find("#left-col-"+f.name).getItem(0),a=a.find("#right-col-"+f.name).getItem(0),b=g.getLangList(),d={},c=[],i=0,h;for(h in b.ltr)d[h]=b.ltr[h];for(h in b.rtl)d[h]=b.rtl[h];for(h in d)c.push([h,d[h]]);c.sort(function(a,b){var c=0;a[1]>b[1]? +c=1:a[1]q4ZMK7AWs*^5RHjfCs=bGFyJ}5rCi$0g;Eiyc$vVI-oU!%8itj<4gTe~DWM4flGr|! literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/showblocks/images/block_blockquote.png b/ckeditor/plugins/showblocks/images/block_blockquote.png new file mode 100644 index 0000000000000000000000000000000000000000..cae3aec621af5da1a22171d6c955a06d45e03344 GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^RzS?p!3-puF6poUDYgKg5Z8u=hX4QnKfl(y1}MT* z666>BpW*3t11}&i#?!?yMC1I~N#1-6iX6`I@9SSieh55%L@`H3tj*1vyXn?JTP=h1 zq7yq#inQ1U$#A%{JZas0Y|*Yj-mdKI;Vst0CM~$$^ZZW literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/showblocks/images/block_h1.png b/ckeditor/plugins/showblocks/images/block_h1.png new file mode 100644 index 0000000000000000000000000000000000000000..3a64347350e5a48d2702f2fc4d436dfb5524b3a8 GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0vp^fBpW*3t11}&?&C|s(MB;LCf(tv(kuC#=47L(MHnu%k5)vC;DY>yMnpz<~Nr#D{ Y!iwS9`#nLcfI1jFUHx3vIVCg!04>HO?EnA( literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/showblocks/images/block_h2.png b/ckeditor/plugins/showblocks/images/block_h2.png new file mode 100644 index 0000000000000000000000000000000000000000..8062ebe8e4b80bfae9dba6f1cbc84b7c2b555976 GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^fBpW*3t11}&?*VDx@L?S#n!G)dYNSA?w0P`#k=BC3P2N_qUJBT-4c=7DO8doF9 fNNuhK(>NH)c^ICE+osk7H8Oa*`njxgN@xNASv4n& literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/showblocks/images/block_h3.png b/ckeditor/plugins/showblocks/images/block_h3.png new file mode 100644 index 0000000000000000000000000000000000000000..5b6a4030284aace8cfa05e67b37966b86355b2aa GIT binary patch literal 131 zcmeAS@N?(olHy`uVBq!ia0vp^fBpW*3t11}&?%hSa%L?S#n!G)dYNSA?w0P`#k=BC3P2N_qUA6V8c*n1$0ZBpW*3t11}&?$J50zL?S#n;RplI5pF|=3^ukBMK(7kCkKYhy=%G{bsE!bmPKkf dt!S9##L&E&;e&1D*BGEa22WQ%mvv4FO#lL=CawSg literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/showblocks/images/block_h5.png b/ckeditor/plugins/showblocks/images/block_h5.png new file mode 100644 index 0000000000000000000000000000000000000000..e153de09988a289dff08d61d489c3c7338b593c9 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^fBpW*3t11}&?$J50zL?S#n!G)dYNS8r_0JFe?&V=A*6{bgq3QHsnEjWrVTveFe e%(Oz4iJ@cy!$Tj3Ri}XZ7(8A5T-G@yGywnxt0t@f literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/showblocks/images/block_h6.png b/ckeditor/plugins/showblocks/images/block_h6.png new file mode 100644 index 0000000000000000000000000000000000000000..c8d993a9d238e58a8116cc24120c3769f6e239fa GIT binary patch literal 129 zcmeAS@N?(olHy`uVBq!ia0vp^fBpW*3t11}&?!_&nvL}F@kf(tv(kuC!V0p?j8%uUS#jzP>U3QZERJQZ)0&Yxv* ZVJKb9@F*b4cN0(#gQu&X%Q~loCICblBq#s? literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/showblocks/images/block_p.png b/ckeditor/plugins/showblocks/images/block_p.png new file mode 100644 index 0000000000000000000000000000000000000000..4e6035d209b9821cb749ae4dfae48b560cd5e385 GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp@K+Mm<3?w=JZgmAxYymzYt_=+h|NsAgeyw*6P=u)@ z$S?Rm!_(~sUO=9lr;B3M1&>3+5$Ci8pAABUjyE$GRWf)gF>JMO?|24O O$>8bg=d#Wzp$PysVj{=@ literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/showblocks/images/block_pre.png b/ckeditor/plugins/showblocks/images/block_pre.png new file mode 100644 index 0000000000000000000000000000000000000000..d11a0fffbe66e209b8db4b1ef18ce95960743114 GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^VnEE#!3-p?Z$2Ldq}T#{LR=df8vg(P|NL6-8lVVM zNswRge}<>q4ZMIneNPw15Q*^QgdU2@V209Ek!=f;}v)6L}p2dBgj&IOGy1 g@NDunVAO48-1Co7KKYsRW1v'+a.options+"",'"],l=h.length,a=0;a');var m="cke_smile_label_"+a+"_"+CKEDITOR.tools.getNextNumber();d.push('");a%g==g-1&&d.push("")}if(a");d.push("")}d.push("
    "); +e={type:"html",id:"smileySelector",html:d.join(""),onLoad:function(a){i=a.sender},focus:function(){var a=this;setTimeout(function(){a.getElement().getElementsByTag("a").getItem(0).focus()},0)},onClick:k,style:"width: 100%; border-collapse: separate;"};return{title:f.lang.smiley.title,minWidth:270,minHeight:120,contents:[{id:"tab1",label:"",title:"",expand:!0,padding:0,elements:[e]}],buttons:[CKEDITOR.dialog.cancelButton]}}); \ No newline at end of file diff --git a/ckeditor/plugins/smiley/images/angel_smile.gif b/ckeditor/plugins/smiley/images/angel_smile.gif new file mode 100644 index 0000000000000000000000000000000000000000..e7daebc2f78f9cf0355ae61222b20c1e913f4de7 GIT binary patch literal 1250 zcmbu;>razs00r=u0;Q!;i=Zu6DWcg7M1koF3sX@9%p@ww<^>Ymbc2Zwol#s==9DR$ z3!O7_qM(9^6sWZqV3bQi(V`$iI}0)@S}ZCUu3B39K4kU4nbmM7#~C>-WMIcKt&J6OUSs^Xia{K;w_ zD&|7Mhs2Lm`k~UFt`0Oc%r!N5o8^9HrT?%hz+4*$6%RFDsCAe--NZwkH~#iUy@L8Ka{uZ?W%>pzA61fm{!L&RKiYO>QBI*dJS3o5~O$_Q|>Bg04SUINg z7;EEAYJDuNftEW#&}9ti2qh3E`HXDGTB<54IcFM(l+?a5L+3CF)nF|c&BBZj^cVd;vbyFZ@o zUk1Gh|A;Ucg=bN8{c1FBKw~nRHj=yR?JXP0K&t(I*0??${a;P=XW?n4-SGWPZ#E1$ z&>ba)V|ey0ZTbNY!$j22j4 zU4p5Ej9i&{bKO2#f!9(pUJ8=}Ln`}=8kp-bQfC{N+a?sY2^IaeiM+c@TeNmdJ8gMj zpJ}IO9$-v|F+FYVrma21+C$rVh)qY^48&%@L?7M_;H{C&4ift_GCKt8FtNXY?Iq|@ zkSUNE5G%+mFbiS_p#f0;BSNc-6Ge?uVedEIe}ZBWs*fFzD7(^fVpN{zpO9P>z2DTD zwnqD~P_^6GG4F&bQ!Cye`{lyO!8e7=f9krjE2{jr4nc}WlOHvolj6I_EZ@3&#dxo3 zui}{4rn>LFX#LgwdrZrB&QIFuyue!j^0TeW(yBI>ZOf}P$j=&%#D=gW1vj><#j%Qv z$-Y}@wQJux#cvGsP5gbjYEx88;^j}{7hmh1xOOf)@->sYTlk6>vNo6DlA&X+qQbXJ zv-`eY*Q@zFnd{|Oy*BdfLW-KMi;H)cq*S{|bO&}7yoo*OAz+pVC)aCl}yzfa4b zN=o_iVEMMwhi<2zntr8^mr>mCOUIM47;MGy17C!0(l~kkl^*BJ;%U}!!Vg5A{DyJC zo5|I6MzlM-dn{YU;D*JuvD1!t-95@kN?~yI(W_5~oKG#$28nXA8D5JLQ^Yay)Zhi& zh|v5UoS+<8i>q8C6358023K<;(sSbe2uc?_g>8Pk$Wy@Ia=4W#NX>Q<^qkBTN4F|V W@)HV`A!jc7RFn=E`?$JLpZo{Av#Uw~ literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/angel_smile.png b/ckeditor/plugins/smiley/images/angel_smile.png new file mode 100644 index 0000000000000000000000000000000000000000..39a85c39854b1d329a666ca2d15f3fd094a41175 GIT binary patch literal 1294 zcmV+p1@ZccP)n8_~O8yZ-&GC=9~X~Ge?YO^88=TTR-TGr~Ei(FGjD{_|^&8_=pgJwTM6) zA{YU{lnR*gv@zwsjGh~k*ncAA9lYW~+Ip~3&l97WJe~17ZQ3^P2*e9OE3y$G6EOKB zSOc!I1MZBL9*9?!cpRfALC*nXj4>yqUwxRi9-3W*cSLVZ3uLR1k;}rnMv))s<eaomVhXt)W5XEbVN(xc>0}K$@2%$}|;yK7(g3GTPw!SOO>SrsMoZl&?)Kq1+ zcM%>MdFq$Qnj<~_=w{beRRWzy*kj;W2zv%9S4SxlkG`<;KjV)-i6^)ckG~C1upN)T72ydlsRE2b>r;59e-hzYpSB8f64=FfUxMOwi24aqARGu24K@?>#OOOy z%qJgmS6Bs*#Xxj@uAB^`UfL#C*=pmbg20zltf_6Y@ zP?}uMaSzczZdQ?-Rrkhu+uQskx}t8s z)epwhjeSrqgVydMxg;iW05NvH#VzZnhH{(1!glt#-es zCS9;HpfzId7OE>@JlUkEhr3N{SBoWK+&G?b`!x$jr`&!m<60Cpl&6;LTmng2x?!O# zYhM2+>7_EhHn0W-E!_agrSP&{H(BxPwLBvu#bv>x;}vfFUUF?w8Y3GKvp2aPK0r%1 z6f2-qRho`<&HOZ2;Jb@=86GK-&pYJv4kPI@KU|sT;!ug$15Iw`28=g`xO=+>AE>)T z&TY=`OyK+mp@3^xLkK4k=SKeo6T@?4GG#CjkNatVFv6BStMH}9Ay>cz5*Wfr8H9b8 zClTKDX{#_-eR3nuGkfza=X;>ZuaQz>3`ha-W{89!6aoRv7oo5KV;0yB#z>5}Ma$BR zWZxBN-nc()6~0=0TL3!akH;xfH?R%pu10{Xz+g3AOk0KAzXE{20Spz1k<;MD1poj507*qoM6N<$ Ef+f01NdN!< literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/angry_smile.gif b/ckeditor/plugins/smiley/images/angry_smile.gif new file mode 100644 index 0000000000000000000000000000000000000000..a5890f3795389d6479aaabed195e15362247d922 GIT binary patch literal 1221 zcmaLW=~Gh&6b0~T0=%Ho7=r90SV2Md03jiPB*YLBmarL?0Ul7AD3Cl7 zWbrE4Vw_1CX04xKA$@H61aIRc3wgs{H_Nj@L)V~TYxQh08b;A^EOp^lD92JCZe`?9 zOyQPho|TSAMY)JB!rBx;g$RU*q)tWB>mHcI^Pg4npBWr0p2LxZNWjYy;E)^+B@*Sy*k{RD zg@X7z6FZrKAJ2MuZ1AOEslLb=gcqg{h_-YK|D{PUtV6 zG&h`lU8^$Hs|=S_h6XiWuQpt*BEG9KG@dpzpEWn1!>?U1v{oD1zI=PV-qdyperR~t z+4`=l?Ok^V*4YGIO;~p`-qQ*_E%?vvbHCnxf4|e*e+TRDGHbeUO*i&iuX*qn{P8_Z z`vRL7UH(gpPmbYJMkqB+@d; zXZ34!6C{Kn{X=yLyLeS_jAHBE8C~jfJ4NQ(s9GmVtQ;$@44TMfWu6<%pJ_AE%OT zp}DEP_{rD$BZvN~`hdK(GffNhGoPyaY8SOlDZQjRuUj{pgp$&jE0G=Luf1wi-S2D7oEVE!x^4ZsJ&$}>?SOj7$Qdu5xdwOGs4psHN11Z&5!wTbb#?E1 zazg0Gr^K#0T0u26Q8aabjenXt#luFSL3x z#;6Z+AC#Y>2{Ar-Ltw{{0Qp_iOXE$CZmdMSG_?Nn&ZD{27pw>V-VoUCQ={=3IGX=v Qr-wH({cV9YgGLJf4>h_{L;wH) literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/angry_smile.png b/ckeditor/plugins/smiley/images/angry_smile.png new file mode 100644 index 0000000000000000000000000000000000000000..dd07d3e6ec6e80601f3566c87c0ce952735419f4 GIT binary patch literal 1351 zcmV-N1-SZ&P)1K~zYIt(9A7lt&cDe>2~=yUAwVT-?;8#1s`Ti3Tsp#!JB3 z7Df7?f zCY$W-o0&fBnrtMcedvMVoMGVipP4h~jJVq~z*trh@cDs7KoF?Q4uDX0Gy`WM(OCbO z06>fduL$^7qIILw{7ac?Yeu!5L$x&nU{wdPs_U_;gV@0rx{z{vBpUnaU*Q!2Uomh{ zcU<2vw0|=afouLUteN%5>N*eteWMi}4v}s;fl9{l?)wT^IqfL0D-w-891~s<@D*ds zAIa}OtxO$0VBD*B2z%Ci#OCK|Itx}=uroTI-2kt=OYG%Z<83@8S(bgm zNFb=fA?$n~vcDIcG-!vd?Mb$@Ct1>(q_HcV5m1W89$0e2&6Z9NTkqv(PL>$Locsn? z@HtdCM7B1NK%EMQu=4UDoysQ7!4&wiSrO>slHt47#ibww0LEW5a-yp(i1Nvg;dKBu zQ0Ih02f5W7qsEnjQ#U{>#O*d% zwbeM`kjRB+Oe@fGcsgLDlwc`tL*}%?UxDo{K#n6$j+TKJnSA-p*9e* zX4I~5ZnR2Qfj?)-Afxxd7%+xpD#buNPJcX3e>_1fnZj*Jrj7SgsefR-eI((96EdZcodH_5Ko{B{P=6?@z>Ndv8JAJ)$@3G?pLn8vx)f= z3NhXS^vz4ybDkXqZ?>!INF-vQO8`SWmFB|TPKsY#&xD3$Os%OWf8rFLw8FU!I9h`? z7+(?2#U}FBz6F_%i4B~w7cTE&(#*2d{SMq-A3gp36f9Uu)%%BsU&dJW=;B%YE(=o< zz`4^7mbEOM$;g3n``6hLq!waui9WGhQoF zDl^ZQg2`S>C(>!@+VKINjc<=?Tz1YWcX`(DUX0e21E0Sq^IUG+ZV!3FkY@|9B)9-0 zz(~-Vl;bd@jPz_jfM@;g4q#XAwLSS+lmMTpo0r$d_iuvsOW2l$Wl3x)4MyWQN+_*x zl!obZ$=~-i)|6S_0XrknSnof=b41ploI_62iGT{9#|ei}SI+}r&8Wqys>QCV!(O;N zie(be6mufNsMaJ#ALb~Cdb=H@#rEOuI1 z?XXJus0%gSC9 z6ucrLa#K+7wvf#-c?e% ztE&1;LE(YA`YRQc2O1g=G&P@TYCh4?d8VuTTu<+fhQ>Qh&9}O`Z}s&*=;(aX(|d1V z@YTrZgNex}6O+%TreDm=ewv&Avb6kZW%bwE`k$@se>=N9PELDVT=u%T?ep+B7!YtU zDClrl*x`tXBaxBE;^IzbW}eQ=yHHhiv99h?L&N3P)~j7z*Zcae_xInLHtp8*>9=Ri zx-)0a-TCwHFIn$M}<~ZM-`&7o=E;X(>Es8s)M4q0;-RzP#Z$mD((n2=9gio(nlatT4X;ptNx;WuN ztFV5@-jYb4grj|W31a1rZ&=(8S(|OixEG_s(0X>k)*A;l3ruQP4GLNwC&bYH>bkp) zi&RF3gOJ9K!tfmjRm$J1a`FitQRz4!pmt*BpN@$#mJ?YTZBAV&Zs;g|ZP#HTU({gY zWX<2;$s)3R8vwo8u96W1s-^00VqIF$2W i@<|6LyH7y_XP?RsdA0fzh90#-e9r^gWYi=C7_0#b4q$x% literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/broken_heart.png b/ckeditor/plugins/smiley/images/broken_heart.png new file mode 100644 index 0000000000000000000000000000000000000000..775146fde1cd8de37b6ffa436c376721dcc3459f GIT binary patch literal 1213 zcmV;u1Va0XP)xlms( zGoesYL^h3tqu4|w3mEue>(+{;gM-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grvors@HvhIc|GYl;#2){`8vn^3@4z7M&MW`SBLC7R{?#e} z+AjXYGXKgm|I0o7(Kr9qIQ`-^|GiEBzEJqdP5stH{@6kP&`tcoQ2*0i{@q;r&2IkM zWdG4<`Ok9w)^zdPbpPIT|JHo{;%xondKah59H+}0tIr#((I2+lA*swUvCl29&^Wc# zJ-XK=zU4!@)k3}5Cd2D7#_V0g+Tb|Kg(l>#Y9dwEyP1|LeGx(7~6|%B$4Jj@|H{b1|med z2tRLz~DRs6Vy)7@y5v>KTnio`Ed1U0RaXDAeb;ALI)3XmLT!NB#IUfSFg61 z!Ffgt3K1q)kRXT3WI1s7fPp{(L)z9D8b^o#0RpZ#SG0A35J9i(*|odm(pD!#ZQjQr Zgs3w-m6|RzCea|Grg@`9ix33@06R_ikOlw% literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/cry_smile.png b/ckeditor/plugins/smiley/images/cry_smile.png new file mode 100644 index 0000000000000000000000000000000000000000..dd610b8f011bd65a2543bcbd882299f133823204 GIT binary patch literal 1315 zcmV+;1>E|HP)`fz#1; z?MmBozR!zx-G)Q2e3Lit#rK`({r%1>25*h<4HVgV$qrfT4qMgL^HMv=H;O zFmNsVKIYwD!mM%wq@-?jB@Ty1B%H#O^SM^B8!Da!JBgaM0L%`6dS@OU_Cuvp9&vuC z?dou&Idyg~PV>aNW0cJ@m|;j5j)GLw&evJ=ZVkb~ByM*(EkhglJ-V9m0`NB_l?eOA zM0i%DBrY9HE3afr6>Lvz26qw?qYzi)B^VjSh$gsCNEmM8i}`11c5S948HV)Gf;(Lz)ww;R@q*9zYKf=IZDxYp=k4+?Mv%aAaO^js$%2~pNbQOEMi}<|uVlUKoky#}HeRNl6m6Mq%-Idx~5-X@`zwjo(vxIU?H6oMHzt z!^O%IzqU95_lKW< z#**5d0nKt(W4JR!qql`nN)?|8jU4G3m5;nS&ttl-ez1f~yTMf?(S(M|H537bPDopj z%1mysEhVcAh(QJ-KKg92Nik?6E(r~li&P+U4oj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4W=wJul0X| zI~OXhgIKRYO&dU9F1a;Ru-M_+jTFPfnR$srk!kt{vz{!Di_A)lL_ZIb_fXRYnQ3sG z99)*HsN(0|G-oeNFf^Pcm9j~tY=*-Y=dVt3;d++pWedH`1@cv6Obq17d-6?GiR=MR zK2eW-8%q72U}dG)^|ka}9A$JUNi=GKptiPz#mg&b-rPWOFaqOg)Oc-q^Dpc1~WF2iF`G# znZ0N7+*PPr(;1GXPXHL9Xe$2~IY$4%SGchkDoR~U!}Jel z$I`DBR!iP?vwBaE=6#TyG09l>^`Ey|W^8baOjMpLs6(hk?&X^u5Hz z*C25nicByJFi|d312=b~>K1tFC{(Te7I-@xOW&K9ykL{<$o_(nQ?4i7a4h}9KS<^y&uvf*JPou0Z8;C{3(%YM7s9dh_`ebWe*;$IA6F%;yZZnD002ov JPDHLkV1fsuWB&jE literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/embaressed_smile.gif b/ckeditor/plugins/smiley/images/embaressed_smile.gif new file mode 100644 index 0000000000000000000000000000000000000000..b64a58bdae93874febf0f8a1d69163eecddf0d1a GIT binary patch literal 790 zcmZ?wbhEHb6lV};_{P96D~@q`BEza2hV}KlyX)9CSMVRK;`~`F_OnXrTA$GA*`j}@ z@c)~~`LsvuSBvPcZjqlYGQWDHp3jl`Jz3<>Ea6{MWPZ<)`oDzb|4O$1i@E==<@&#g z@6Bq#Z;OQfE)n^+QuNP4neS_*{;iUJwn^syR>A*!ME`D*{^%mp^+Q|L^tvzc1kL1&4pfBmdov z`E@q& dMx0C-IEBkZ3`2W?azmIbMKCb$IvHAba*8f*}|K6Mb`(g9{C;k7Q&i?;s z(ZAPg{y*9B|JknpuXp@^fBFBXTmQd3{QvX$|6ecu|NqB8RiOBjg^__FjX?)wDkx4E z*#9-8H8r=SwxzaocBQ4pg?K0_d4$AubT_9anwtj3q@=`$x|t_V>q-ri4~Pl&c6RoQ zOpI0vTQ(!iFe1p&!G6E3m2K3lZJmjdKA!vb+uI(rQuj(yN^CVVakH_r=i)kePhD+m zxY@E;DHDA|8*4^J3kyaDMI{C8S+UI_@_Kr&mGAX(a5yxza*57!S*Wz)j3Bpm$e+iC z2?sVavO0ux2rN7?Rk`C-$A$??tz3fYO)MuTDtGX63o1BxTy%Bu5Y!G>5Wskd#e15n z-2s<|1x;eJd-_5yoV@JPDWkfmZo!8JjczpsR@a3Jo0&RTWc;QmI4*K-W@qO+V{j-S zU^;h+^xi`X3JcaTFzL!!6co6$>}xa8@Y(R-AW*SaNFq_ zrYR8{99-B8Is;;VEMWZ1#w%eElTh%mY2$?uy#$N3jHOvu#aGkFt bA>vxKt}+WRE&ZYD*3M%)-|w!E0)sUGXB1bD literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/embarrassed_smile.gif b/ckeditor/plugins/smiley/images/embarrassed_smile.gif new file mode 100644 index 0000000000000000000000000000000000000000..b64a58bdae93874febf0f8a1d69163eecddf0d1a GIT binary patch literal 790 zcmZ?wbhEHb6lV};_{P96D~@q`BEza2hV}KlyX)9CSMVRK;`~`F_OnXrTA$GA*`j}@ z@c)~~`LsvuSBvPcZjqlYGQWDHp3jl`Jz3<>Ea6{MWPZ<)`oDzb|4O$1i@E==<@&#g z@6Bq#Z;OQfE)n^+QuNP4neS_*{;iUJwn^syR>A*!ME`D*{^%mp^+Q|L^tvzc1kL1&4pfBmdov z`E@q& dMx0C-IEBkZ3`2W?azmIbMKCb$IvHAba*8f*}|K6Mb`(g9{C;k7Q&i?;s z(ZAPg{y*9B|JknpuXp@^fBFBXTmQd3{QvX$|6ecu|NqB8RiOBjg^__FjX?)wDkx4E z*#9-8H8r=SwxzaocBQ4pg?K0_d4$AubT_9anwtj3q@=`$x|t_V>q-ri4~Pl&c6RoQ zOpI0vTQ(!iFe1p&!G6E3m2K3lZJmjdKA!vb+uI(rQuj(yN^CVVakH_r=i)kePhD+m zxY@E;DHDA|8*4^J3kyaDMI{C8S+UI_@_Kr&mGAX(a5yxza*57!S*Wz)j3Bpm$e+iC z2?sVavO0ux2rN7?Rk`C-$A$??tz3fYO)MuTDtGX63o1BxTy%Bu5Y!G>5Wskd#e15n z-2s<|1x;eJd-_5yoV@JPDWkfmZo!8JjczpsR@a3Jo0&RTWc;QmI4*K-W@qO+V{j-S zU^;h+^xi`X3JcaTFzL!!6co6$>}xa8@Y(R-AW*SaNFq_ zrYR8{99-B8Is;;VEMWZ1#w%eElTh%mY2$?uy#$N3jHOvu#aGkFt bA>vxKt}+WRE&ZYD*3M%)-|w!E0)sUGXB1bD literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/embarrassed_smile.png b/ckeditor/plugins/smiley/images/embarrassed_smile.png new file mode 100644 index 0000000000000000000000000000000000000000..f01cdf3b72331d89371545ef706828eda1a936b9 GIT binary patch literal 1222 zcmV;%1UdVOP)~}GoI5=@g$GxACK8X5?Jur)y=aWuu_+R1e(Qqs9J`2AeX5ns*KXN0Ux2vnJdF>o~u?cQd~pSGVhku(=;8{DPFH zkm4VpK&TTM_dwgDkRE~2SCu`l3%g#L0=cW!;70goTzKcO{`moJ*K=xQPE6rPa7*AS zSPQPbUa5!n*P!)57&!#n9)sO44<()4)2ra^(eObQCQovzUn?Dt69`-qQ$Gi)o~&K7 zfff`t>_@uZhEx5@L*EO{9fL_HH!RbsMK2ZVPV)7>n5BemYQe~5WCKVD67ei3^md2A zS`z2-fYNh&1Ddl?7G&o!WK$bVoPbBp%p!pf<2y3I%;^~U^SG4&l9@r56!J=8u}tF3 zRT3jtDHf^}3oeP#6k{U}rL08@g60)_?pp_*+j*SFMhDbPw&bzRrU_t*ni{A4Ta_J;M?{#=OfmVa6c@+RL3L(W5 zDhxhzo45KaDX_}mpS7) z{Nzl}q4R=P1u6n1Kn1i4rMYEZ&GQ729;8|ptPfe1AH5r8eJw{-(NGIGV?v|{Ah8N= zf@P?)o{Wp&GI_B`I#v1yyi{_zx(JAcfQ6uoG=-7u1T}cgmN=0fOyd#~YV!OIcoR48 zYUAAK6q)(*syk?Fb0c?jZHLQQBqZKl5{n?&1nhbRAim-dRVVpsZ_LhI#4R@3t}M$gY-uN2UdVA@)dEsYq{00%~AkzmK_4$(Q}OrAAA=F{Z&q zHdqkfSLOPqx)#kD?2s7T7a4`)Pf-QM#N;8H#-+-3Rq1xSUSUrxi``8rS$B}B$h+FhPYo*1t zNU(|oOCSM5_gk?0*c5QI23zZ~XahbZd;UqzJPX-z2pI2?FsN^dVDao}?S_4yLd%}d zfftibZhl?(iY8B>)e~I)CQ5pYWq}v9nzldeAi)=sPVS2v8SBFR2Ccw;;BKJDuK;I( kF~9z>@@f0e@c%ph1}6n&33R+`Y5)KL07*qoM6N<$f>Bl~-T(jq literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/envelope.gif b/ckeditor/plugins/smiley/images/envelope.gif new file mode 100644 index 0000000000000000000000000000000000000000..f8ffc54345b0346804b98ec2be137f9f5a8dc839 GIT binary patch literal 712 zcmZ?wbhEHb6lV};_!h;me8tk$>z1uszh?c0wHr5W*t%`Yww)Wd@7TI?=k}euw(r`z zZP%_HyLa#0y=Uj1{X6#T-F@J|zJrJMA3J{Z_{qb^PaHdO>d1*xM^BwOe)im%bLY>V zzi{@-wM$p8U%Gbv^3`is?%us~@BW>8_wGJ?bpP>_hfkh9dh+D)lc$fLK6~=)`P1jm zpFVr>^yRDPFJHZQ`TFInS1(_I$XBo5ym|vduiw0V{T7Jcy?F;j?}6mockkc62cdWG zKfL?+@%_h-A3uHi@aYqf{PgMbr_Vt2<CsUFB2hNF8fw~6LVRI;YXrLd zovd}Wbk_*=wna&BhxYip+3H${&f3!{$Lc?4v#YhcKdaoSD0vp|^M}0syjkRXqg0uk z?wt4E!lc^8qeb8l{DSDqfW;3SbQ!q9UIscI zZDo)!jB^NF*nXs4P?gJYK|<%Qd@df2i4m+S-U56rI*Cq`I|bO~BX;TBNMh<&b!gVR z8Mttvb5m%KfytqgPM>9NNhJnFB1xj^%2^yAH->gxU+0uGqu^4IV3U|r){ltO+jOJ1 ws_6=t{CeQP!Y^l0@#eo1cz7~jO~up|_cuE>GB8*J0KYP0CIA2c literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/envelope.png b/ckeditor/plugins/smiley/images/envelope.png new file mode 100644 index 0000000000000000000000000000000000000000..b4180c5b36831cb62cc9ec49b22f7fd73136f4b8 GIT binary patch literal 1049 zcmV+!1m^pRP)|7Y$D%Pu<^l%~5vBOqRbpB~*|o4KEBOl5k1H76fSl3+`6d+1m^|Q|Ii?%;OtGa2F&d{*&j; zdCvJg&$<0sCSSqFl5|!wWyXF6@Ed^k2I)-zzhn#U)M@M4X`QFc*!R53r{?~cl}hDO zUEVZJjE!9jR7L$UTX26rH#}v=hJqk?FgyD|H{06qb>BC2bN>8m1$irv@$u{bOOkXw zTW}ZO3s0G`&!Z@sfB10DP&EyM14D2e8`WABVHhHcBFM4?)4YJ?Zbho)+f6$N1wp;RhjpnnidU|3pSGyu#T zuCIru%$NaSX65mtwCB1Q86E{=3;>`gDq^t~G&jefH#I?1H4qUFDh@`5N8!0HRvte} z9~Ll<=$U*4M5GhZ!urM&x<7r7IOlYhs#Q*|TcJ|9NUmEU&NGr=c{)T-oqF8Tf|@;s03PEFFz&NdOzG!aQ4q8r(4h9)L& zljAt&1|L_gR-;<2Mvmjq#N=(tW-~-YH$X%OcP4I;Wm)8TE=5uFK?R~HBF}TlvMjnY zaf^uPKmgFfIY%;?gwK8K=UyNPf<}MhR0TnR{oD)q+($B*1m_$8T8>@|V?ZLFfTpV0 z+TKLPJ)h@P+zPg~H=(I267d8M9~giJ-jYbPf(ZgPp01%I-HFV9&$0LX-#Tc=rO%N5 z^b+aU-#arU|qW3GzFU&%cWc={mPY^}%C?AF)<`?ErC|Vf(b{x9i z)Nofq!%+Z*q6I}!G1NZ{#u%a~Its=ZhWbaKC@Km?>oi1TxNVp5(%Q$>zJ5rO3?ixv zNs@52Zva+42iq<;gx4L5@4rIM%AxymFJxIk6h)_YCd)FqE?>b*Yagnnp-DS=JSX5` z7@%yIaq&Vs6y=mIVRV*CC1{$8X1y7rD1zwy;Nv?G zL;;+0`2GP5!vKI?0l>}ft{$wet)gs~>n`uS!N5?q%UE4oMR!*Z0Ni9mlnldgeQ$5~ zlYh4UhHcyD?)Y7`wzi_D`wBWbI`>6U{PKT6>6cslpD{oR)-=eF#&B$oGsp$?2i=8$$7g$-ZaB^Pb=@noo3e-f3#S*3o&TtNTG;|C65H8$-i)1_ob^j6Rx}d^R)t zYHt41-28{7 zJXpE%(b~0-)~|oDZ{OQ9XFgoJ_Wk9{AFp2hc>Vh4`}e;;efsn5+uxr*|NZ{`@6Vrq zfB*jf_wWDz{|uvGfI>j=CkrD3Llc7z$bL|sVBq-2z{)A(v0=f%<^~}qtrZ1|PG+$- z6C{Gu6&0)!9aJ`KI`+`PI!ceHa8n99lX=4xnHvvPxF+&Mec)l4vXph|Z1cGR7n~k) zp3@46s3_!E&U9|EpWY9aDq#&)%O-}>pNg$rQ&vZ8ym#dnvyT(M_X3wjr)_H@HwX4L zcyusuPTpSd_*89mi?frk-J}W0=QHzI zyDjr$jst>AHa|ZG8rW&w7tD;Tymo?k-_)P%w(Az z4UTtO3m@~H_@nptsAJc2twqZV6w)dk?IKkc+}Ky^DE^x5tKx))f<=FrglF)}9Z^pFeA#IlsT&fx#L8BKI}K literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/heart.png b/ckeditor/plugins/smiley/images/heart.png new file mode 100644 index 0000000000000000000000000000000000000000..a5335bb60ff52187625bf8aab263e892b6c3592b GIT binary patch literal 1073 zcmV-11kU@3P)812Gz}(w;Sb=kh8GjlSc?&TplPBubrTZOdO?VgXakWdD;i4)>`4$gEOhs{ z;GX6D`T~Z_ibT?H@_U$>?|i;9lbKNhQ(^uuIhHrv8BQngEl>fJ0Xi@M_%z+Pv&?q_ z_zKtyWCDG_J>VxzH-c|~fvGTosW2k4ODya8^VU|md-SOMmYpq~Wo7c9u~BB9JP{H3 zQAD6DQxS42c&PtTo`>#8bG^YY~1@^YEqvqvKPfdeyz1$p#^b@6l(fPlBJ_`p z5UHr3+UI)$l-Pjp#;#qNHs$tY}>XGGtEuI6%ou(2*Bw8hFl&`)$GIs>07sM8a`tfqppA!5}fy+;oixgJf1$0}Lu6@^N%_cBo^=jx9U4Y{3=hCTvvGkqFNc6Zz8b zH|(lfVAFKt@5HpU?<+4{U~poB@Z8*ctvD2kFr@43ZfnD?s?C~iXtu@Bmh9uld%S1Q z^6N!8A8qk@puB`sg-5Ji0#IpK&PoB&Q`F!N6YTN(;Mj{b18XDMr`Emf*r|Cvuxn~W0 zF`&?jM(^D{awI+0-HkgTVU1@j8YTJgVXAN32r71am8KiRt37eyivhc0;c(aO`ub%1 zzyO(c`jcnr7~ rCBQd;7w89CHQjjju6Y}RzpwrS3CLKb=r^JA00000NkvXXu0mjfGA8{x literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/kiss.gif b/ckeditor/plugins/smiley/images/kiss.gif new file mode 100644 index 0000000000000000000000000000000000000000..49f31ab49337bb92de7edf4d6d4ca3ec0c7f82eb GIT binary patch literal 1082 zcmZ?wbhEHb6lV};_`aNB86)FbX6ALw%&Xbh*0Qp$VP{{*#3jo#E!b%FBC=m-m3M@F7vrBch^b1O!fqiJcM?J0K}}R95z= zoZM+?>2oqN7X<}xi-_EpmwzBB`9MbIk(}HUAd;6qt*m@YPw%OM!ZRRJRD7ze{8(N6 zsjBKTHMQqzYA=FIsa*Z-`q|H{DNosrQ~YwO4M_8$xkJ{uT(GBo^RVDQDz z@Vkl0cT>|JKxAh2!@}aHmDL|>>z}r^|LyGdI6LokbKCFjeIzRCv4g{NFR%a3&i`Fq z|G2sR_wxGV_u?!^Z58b;o(1{qE4iyp32TXTU>m$q~u&#+4;)K3sqGY>*`)) zWc*4^eN|HOx3u(cMaA{Lz8e!K-k3D$=G3XTXV3mSbLQXKv;WPVdw=QDhilgSTe$Gw z^5u^=ZhW$7)3Y5r{_WoV=G3V-r%%5-fBwVOs~@jl|9JD}*T;{)J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;sOl1KwmR2wHItJgN% z*D!LQh|&sEPxyyt9(s{bEm%^u;j4-GjMtGRVOtbmj%j%Z*2{OK7O^g8Y%2L_AoX)K zE5K&z$z0d;b5cQRqU8`jNA>}~al8CfvSh8xXbefwq)m|D>oAx F{{vqsHtzrc literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/omg_smile.png b/ckeditor/plugins/smiley/images/omg_smile.png new file mode 100644 index 0000000000000000000000000000000000000000..cbbb106a1970d7249505be4f3ee98c0154a48a7b GIT binary patch literal 1196 zcmV;d1XKHoP)epz-v(>liU(+gViXvKHS5N^U6AKTClSVu{wsx zPb1cDg90jApsE%8&q3k}Tzyl~`nF)->(d|(xgFdK|D2m2oK#aEW9>hq7U#yq!sO4y z{z}o(7GQT{6<888XY#|v7&Wz(g!Z2x+WBLnbthvJzZ1=V}| zqDE#&%-l`eqe58|e0w;gcH~ihKbkcI)jlvy$Q2-;2TK;=Xc|5T~8Ik`dAkIdK!{xn2kev1t!nK z&L_a@g}F;1pxfiXJ4xuUtsKov0J8WW)^Zm5l{f&c4>#EGtA<@S@1oKJCOB%mY6$15f?ajxgqpSkuxqCmq*||o9>}eMr9etV>LylGNR=gYQ3|)4>%whHp;;Dv zr%bTh1lj@gjqqHd1Zr*Wq*SuBR$xh#R*hI1$A!DG3=?RFTY2zVC9yaM1+jR6$gf#@ z+#aYT=@5{X)*Y7DQPz6(J=_%+L0O9G6 z8kv;qoT!l*qNZh#gXds5t5Gmzsk82<>#1w>QP=3B`)FuG_QK3dEjy=i@Li~B8Fbh7 z%}cJ5ql~}5htc<-LfMWL;M)dGA^X8UXJI*G=WSYm7Y?0+mba!6+SW_1(}5rOgr(n4 zaQS6e8ig{=-Xt`XJ=LW^+Vg8KTY8Ze3au1ciW~$KCIK&C*;oKk2b(x>&fT1;(M2?FGZB-8R1g?C z2?9zo6hRT>P66A3SU?2QMcQ2FMrs20|2+W22Czph?<)Xn->0s&V zA*N-XgXNx2ugk1gUFOSOP{~3S3zck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mV?d00001 diff --git a/ckeditor/plugins/smiley/images/sad_smile.gif b/ckeditor/plugins/smiley/images/sad_smile.gif new file mode 100644 index 0000000000000000000000000000000000000000..ee7810e472f5fddc5251d893d7f20b8160a607ea GIT binary patch literal 1199 zcmc)J{ZrEg00!{yUKosRh`em$Wx#lmM2Hi`R#`GcJPmBn;b|v#Be1iAJFTvWumB;B z3zbCjnpQFxIEc6L+6L$laWFu}c$*2wo6uFK$(1{0-|y4czoO?p_x$?&^c*~tD0?+S zM2HCc9C1ZST*)A+Pcf@MVAg)ftjl4wd@bnw!l^5t(_73ll<-H(x%V#d$14TaN}gHe zWmb8cuL;dR3Rkak7h3!lTK%DBqJ{}I3pFfg=yryNjXEdP(>S={gc}@aY0hYHMvV(J zTxfWxcSEBK8o89#6~A!NL^lsjJT$wanTHk{|9P7mTKQ-dpiKas8`^1G(6ME`&V8*} z1g!@eL}>7(8hz2|M>a{;biQjHerw$lbh@K!E4pbO=<&p_p3r-4>V?pI!QhQvnhnt`%$n(<3Tj$qp86d((($XWSEwbdO7-%(RT#>3To&uIg>!m$sI-otm)MJ3CBn_ ze#_jnopj88g4tYH&r-8rk;~cSN**Q(U@63839O~Cm0+q2(-$yv(XsF|weZvC(mAYN z#EJ?JuVS$pD{9AITKv(Bm3FLlIv#dmO^-i&@YssSQ+P6mCpJ8t$G;1(FT=iqXX|+W zJE%=i4p1aO0U-X5NT0D81Ysj0UyQ%_1mQvv?OcD^-zwurY|n_%&jiPtQsRrt8%p>~ z14W}F(lzLaarodEaQpvygQQ#WvL{ zVNTLm@u;FTX4<;`w*2!)Cb_r3WmnOx>2$=jsh-V^3*1`~;%shFW*zo@$8sp8Ch;tj zeXJ(&QB{OOCwnV1J18owxWFTZNf29uOTJVVGM#1`k270J8gvIMPR4WiabroPZ62w; z@zP#S!jUPfYWH`^0!^8RG>g{)F> zn%ZenRroO1JDl(C;(l7mIKL*FIA2>G+dAhwq{www#AR55U0pdz6~<++iuYLBLZhXY z%ZgIDeEdLiIe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x7|g3lbUt!y<8hlEitPl3{_YWpm{agdPT`6DH1tYfl&r*hn@3tu8b(3(~Yxwj{ZnX%|sJ zZrUO@Z7u8z%7!Zi<}4~T2+JOWY=T;E-~js3N5Jg_%dC5+ogFU14|wf$$OTF*+B>0K zwj-AcatTy;H)8w*)Edr)XA`i@A+e-}sF4+Dmc_0YR@%|tngprX_1p^kJe8>{w8&q= zdLXQtvI(&mZi}o{e@>LL?Zl+LwiIQfN-23AW2Q=}Xi_d&_=7G&K{tphlyBE%?f?=5 z`gSloq_ISs=ay$Glx9qfVujL7mC~%l+15>SI7V|cMkw3|LXbH*KuAhda|h@nfD`K>D#%S)`fadblMOM0<1Wf}=qBI|3`XY2ZS_h94 z=!44@@K^v;EyaqRU*Qh+a6d6_#c_L^K~+$WcC@KqVa>6g zhnTu>^uA!FET%>d(;oGqoE?a}*AOksp=%%moCDC(dNGf1>|@Iy%vex0r9a@NFm{Yw z^4LAWH&4EZ!J^kROtilX?a#Cn<-Ep*gAjf4cv>%hFc(Dq$W=1Q z#Sfz--vh4$*|U<|jk`==oy0V%D5+=(E}?x@2i~PFMDhxl8uY#kYY(IlTH}#hbKnO) zW%`e27> zWJj1+fI#1Zb`9tV$E#_*_;sV&G=$Gz6FdUMfWDdq_zf7T*`NRUwf!gf{~><^yofxE TOI+OB00000NkvXXu0mjfyQ@Yu literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/thumbs_down.gif b/ckeditor/plugins/smiley/images/thumbs_down.gif new file mode 100644 index 0000000000000000000000000000000000000000..c01f763fca94c4bea3cb1c8d808d78eac24e8fa8 GIT binary patch literal 1117 zcmeIx=`WiB00!{abk1dt3^N^SVuE3k4Rfq)t|e9xOH4Ln%Ou-s#7x}Bi&3iN$ia@{7iWs8ng&(~^LbsBbqW}#8T zY0+|9wOp)rv0cKz?XvohmpYDDzMri1p78o*i^JSy*3v46x4y>Xt?#cB*Z9k8{FMVf z<#2;`C}bRoXE#JV#WqJM6l`vZwj|5f#ov$rSJ%6E=cf7ELA+3D%o*%|OZ|6&1{ z2BHT5rGUqI`S~XRqf@}p7#cZ%BbI=cZqTj)K`02WLSdnz%2t1m;21{$*I8`*77`K& z;t>vkVbFAM0Z2jH`y+8N`vy+6!S6V7SVkv)&e1!qEt_vBh`x)=(n^~jM4143-xAHK z`zdXHkD8Yyf=LwOn)#Q?E14_|w$C?1WaLDq&D&f&jg!?ym?c1i>f^UVg>W`txXFUNM@`eOjSH#%{ zfH#HXVzdQp!okBe5>m15ZQt_(k&e-C2R2zYuC8E}o!dhkudoz32pE_mL--*eyEg2) LzUN3190>Remz1DT literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/thumbs_down.png b/ckeditor/plugins/smiley/images/thumbs_down.png new file mode 100644 index 0000000000000000000000000000000000000000..a6bb53291bb928d3893e8e3ea9509f6233cd090d GIT binary patch literal 1059 zcmV+;1l;?HP)QwTOLDDYOqFB3RUi7PO$ySA7X0qEx78BURKQq{UJdN;fCGTH?9TvS0cU`nKr65X z*aT=53={YmIBr_DQwjeh9v?dx`}rqwxf}qRrqLd4r%s(>YN&_Qt^<%trMTSpJ)1_3QoH^R^xAs7z5pJ* z1}Rm9)Nq_U6dmm8-x=vYPwSzt2{b+UrfJzH7T^-_<#IW6T_<5plCUPxb)5nlt-B5p zZrMR#T@zLQAX2L3EEOSC5Mb18pmFP?41Ri$T2&?^Y(0K_SmC7v86F>th6NZ=#r;h3qT^z#Qx)F&bMYhvG3X z!uQa;_m~583&(Lz#p7d#mpxo<+X#w3xO!?I%^gqT^Vcmx;sX~5-g|`l?ax>CI0Xy> z@0pg}EgZ)Q0&fFP1J&iAG^OV@kcfSBVEmh-+}ZgoicdyK<36RMw7G66s;nV_n+2}=6@d$?)Y4nn-M@sZ<<#(Mbe z%6E*$df52zYXI-Amb4(ZBQWcprhr2Qb3XOTZq}veW+wzT}c9&yb+nG>NFD#t2L59W zg2x*LPqc`hY!yA;Ds#GB@?@v-$xfA1-D;hlq!I#6uUycA#$(N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(^Z1HjRk=#!2IsNTxH4JmM_+Kqd#x{@ zCpCNtYi1l2#R@5@mQt`dpJR4P(vy!q`Z7IL>ht@^Baebm%7QDZa{jP0ZT!NbgmdWMoicQ!6M+7A$qH=f@Jt^w}@ zuL9*X5sHd{4W600000NkvXXu0mjf DExzht literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/tongue_smile.gif b/ckeditor/plugins/smiley/images/tongue_smile.gif new file mode 100644 index 0000000000000000000000000000000000000000..369b43508217c8045bd03478a212069579ed8fab GIT binary patch literal 1216 zcmc)J`A?Gv0LJmx($aPK)MFh(?+dnw;h}g2gJ)QjKV( zT7U{6bRy^^RHX!!o@BLbsX?;TsOJ<0o0&>l$9CqthX`n@o)-rBDq`{m?-0*~Yv zlw(Li4tryG14g_tpv15bMrkUH`Cwd$$21j;G+&r}F|iSov`wos{xGXCqlVcZGaulI zKYsJatUuMel^hRTdlCRs5GI1K6i9Z2!LS#GSlo-F9)3nnMo`mXw(d9>zouprZI9CM zBzeu8Vw*aKsSFrTQd6hMr)lIuCdN)8ujgQW3hM&iE@Sl% zP-~!Uph$oMK>SZryk)KN2*O|1t&pV2RCU$`|xcnBG@MU3)YJZ4$->uLCIk}bbC)Rld&iUA_+H*DX@?FaIbFAug zRm`RNt}Q!bHX9i!!_#|MJ*>X5qc;y_1ZY_$pI>GPd6s|kFR~mqltwvsXES8#uZo4? z{N!SfvElk?dqSEXy3QjaoW(nI!ujDg=B8r|#}=h!fM5y&PW!40yK)4+8!rpCx8?@i z&%eqMgc6K|a0YjMditLI{Mr2su6o*%M=&z7cX6Z{al9X|DDCXoK1m8sH)%Q%xi!K) c{(|3argOx`27$}7aJKBb@uDQ5tAP0AKd693O8@`> literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/tongue_smile.png b/ckeditor/plugins/smiley/images/tongue_smile.png new file mode 100644 index 0000000000000000000000000000000000000000..5bee4c049e62a165432a5ea7b8457202aeefa8bb GIT binary patch literal 1206 zcmV;n1WEgeP)R`S(u;7aiE5dZ5ptFA%xp5s^rwxOxX;#zarb(N0 z`FHO*KHQr&EiDfG!I$6t!}%qf8-(j@+n&ht`%m|nfNJpHPfnEr@3LQuy7SuofhWF!#+`$}@r0SrtO<9(dYr$$XyfWBZSOfI*wTk6TtSrM zh~f>YHC-KlX-}Vphn)A7Gcj z)}R#FYB}SD@CVRx5Qbld`(J?e_XZPY{?!%maL{*{g~@ZA@6*=a7pc=XgiuM)+L2Og z7f=eC55SJk;D;W~!QTaqy9N?wen?EGa!yxhdy*gbhjddJ-O_@z;vfJGMkEUwdb)g| z6vpL6K-1ISuv~P&mg!5F@SF>;4u z!J=5OF~(9DVKT4_+0^U1a%ld+sd)R4*A zWU}`1eNH=Yt--pBj-Q2XPea-O=&g6*J(y8w@PKWtXwBBGUP9Y9JJ(yhpmoi?2TCPp z=1N1xK!=VXZk_|^S%#+#*jBHwl|;BtHAvfL;I)UH+5VFPr5SkTA?JNOxniNk!gcKJ zAzha?L@nG2<*t4;w081L%Iz4}g6Y|1uWPfYKxuYqc-3=*KsVei$*R})B(+l7vlYy! zAkYn9tb~^;HG^#~U&%2wRah51JyYgdtmxQcE3|AxWG7e+j}YjFLK$q^m15f?&5TC# z{Bm)gn^Q${Ig4D*Vk%MMw@Zs$953R3u*sRZ23_w*%uiO~k(y0pO>%x;2jj`vE)yDUg-a7qvCvwg>jO#_=Ol+NL377I!psjW$3;2PjfW1Jsn*sg=qHexe`)j*r`2UT60YM*Z Ut&PLbj{pDw07*qoM6N<$g5yL)asU7T literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/tounge_smile.gif b/ckeditor/plugins/smiley/images/tounge_smile.gif new file mode 100644 index 0000000000000000000000000000000000000000..369b43508217c8045bd03478a212069579ed8fab GIT binary patch literal 1216 zcmc)J`A?Gv0LJmx($aPK)MFh(?+dnw;h}g2gJ)QjKV( zT7U{6bRy^^RHX!!o@BLbsX?;TsOJ<0o0&>l$9CqthX`n@o)-rBDq`{m?-0*~Yv zlw(Li4tryG14g_tpv15bMrkUH`Cwd$$21j;G+&r}F|iSov`wos{xGXCqlVcZGaulI zKYsJatUuMel^hRTdlCRs5GI1K6i9Z2!LS#GSlo-F9)3nnMo`mXw(d9>zouprZI9CM zBzeu8Vw*aKsSFrTQd6hMr)lIuCdN)8ujgQW3hM&iE@Sl% zP-~!Uph$oMK>SZryk)KN2*O|1t&pV2RCU$`|xcnBG@MU3)YJZ4$->uLCIk}bbC)Rld&iUA_+H*DX@?FaIbFAug zRm`RNt}Q!bHX9i!!_#|MJ*>X5qc;y_1ZY_$pI>GPd6s|kFR~mqltwvsXES8#uZo4? z{N!SfvElk?dqSEXy3QjaoW(nI!ujDg=B8r|#}=h!fM5y&PW!40yK)4+8!rpCx8?@i z&%eqMgc6K|a0YjMditLI{Mr2su6o*%M=&z7cX6Z{al9X|DDCXoK1m8sH)%Q%xi!K) c{(|3argOx`27$}7aJKBb@uDQ5tAP0AKd693O8@`> literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif b/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif new file mode 100644 index 0000000000000000000000000000000000000000..2cc81c14f6812119c710e01609a0b26fd77c43ac GIT binary patch literal 1190 zcmdVZ`A^da00r&7YM>|c34i9vC zpi6{qF>Z-r^t5+Ka7%(N8PzPO405#jlFgxL*#<)-)v*N~QD{}dxC0%#(7v1O+JnwL zcC*ah=Zzi-Otg(K)1>H?qR*4;^+LZF24xuZ#*jCLee6SWa>$n)mSe;hqrSK;C&xBn z%nx@qVK@L|{TqyofU@jc@!f-Df^WjwAR&qQV zlS)h}VT&f)W6|{yx)RZyObx`7(;rZ?u?|x*te;WyM;s%W`18xPxeUk5H<| zIT1uJ5&Cxi+fNW&iYVZDDI>0!(pc`By+rEinz-%9BUk;I1xSPJ@eCrAurxftyVK~6`Q{pP$x$-onyvA;|edyE~phMNv89a5iQ4s@scg@ z9oTs~vS@qmKR+undR77xPB&fhX*%o`a^UJ>g{<@YHOeWQ!xyClpBK&Y`b+#i6@?%5 zUh97;I4I2fR{Hw5Mlir;X+PIrkKqb0AMKPre#+z9a^0TX*ZU+F1|;rEPgO`88+-W+ zy9ZU=ptKwlC+bv8g3465^_=E@nLx#LP5d<{IBM^!B4^1liJ9Y*rR`zf$U7uZBt=G; oSgui)97d95$uD1@)jYI*Tj<2_yWK|&mRQcl+LdAkn?>yW58nPPJpcdz literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png b/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png new file mode 100644 index 0000000000000000000000000000000000000000..bebf74daa626292587f5a64c5e3921a73c1501a5 GIT binary patch literal 1113 zcmV-f1g86mP)2(5HZ@H)$);{?u%gA#B(~-gTC1pi zsP@4IDTrFd`lKKcrHW4?Mtl`NpuSl!;EN9_LbQU2H8IrOXtbs^rBc|eansz*Za153 zHhb?JAMV{`x2$O&JaCvh4EJ~Dod28|HM_7xC2NV))&U2AUZBT!0L%9Y;HS8q%~S*c zsuH{`g!dd|y_zddq9Rdd8b~aTJ?tx{BOCR3Jg+X!mo=`ORp>n^W z)?%pDDhYq z!4)tDT(dD!4J~g%<6#(m2JUzg+Fl!q+u7&J;4P8bqhw}=8R-+J>nW<_ic%&4BAy#l zIe;+`J_Nhphp&2s!#^nMTKkI{C=sbc+!?+;7?t`pq_Gk0#6ST8)4qnm|>x#_eoI0|%Hp8zpxE*%n0SW9vIxT`6FVUc(x@#%j)C zHRocDFJO(^tma%Wem0i}q4_}w24U`O)IY*#pqHctTdUDd5{%=e>>5%j#}iQ?m3B#` z-HrK@cyJMLR*=|f*zqtVE&Sdf0Q6u_LMRBXQ+7^o-(F30*Ea9Fxf(=D=0V8ky`39@ zl!Zi(p{@>t-*6s0X~B+w!8ID?lLfTv(*OM3-fsU{03-B2dzZH!OOy$%G8b`oMWrff zsZzLS##g^+BHlQ+;GY=31hexSwJsf10rK-@nQOqJsT)@Ex>)O5a#QXS+z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 index 0000000000000000000000000000000000000000..805da9605880b395a2ab1495ec826dd0807cc215 GIT binary patch literal 1188 zcmV;V1Y7%wP)~^x%cLNe&?Lu_jisO9h+pXkxDd2fwe#{(Blgr?P~z|DeDvq za{>T07d(|{-ip`{$Q@7O41hBL`2p`^ycZI_k{fd<{X*6$e*UlURHC^Zc$dQY9h}?= zVHZ*lLwq%~t^uXs+G)5t2&3OXwFc`xg6O@6fL&RqI6f!b1IuZCd*>d`?iI6Qr(*tU zRQU|5nn6un00AOh(6k(4TOfZD`d<~6zoxkFWb3k zAHh_>2v`fo&PEy`wFhFGpzkTT^Ks~WG{1d|3L_c;nK0BZ(%ghOFj+r8qsbZtP936@>iAh+ZMCs z`7UCM+L$a^#wU!w8W^ASS0n;%3CSFQg%3eKjo%xDfF7Jdh=jqoGd9|=t`%$-b*Ki? z#JizX(HPHSW7mYQj^?SB4b$&#lC7777l1RUhGBwBAM0RVTZB)($TR#$nc}49BDZG9{avG6GP5%m zkWf47+VC`dAkakaFh|xTaes%Vh__+kFx%cCVueU~Mluj0A_KrGfs&k{u{uE7ct zNg~{i*0;gt{v0Z_Eb9~tv+X}IbeJQ((AsFxS|c8aSQOf$(9}r9RfI9~T%OVE6&&01!()TP(oQ4MN zT@o7cXR5INirQDg`UB9m{A1vytW&&tOL!p3cEsJ!#iI%GgUkp#H%#lUM;uh>#jI2O z>?X*q;C_O3U<0rU==LMPDPYi#Kiqh={U`YUG5!I(3wUsm2)vX40000'],d=0,g=b.length,h,e;d');for(var j=0;j'+h+''+e+"")}else f.push(' ');f.push("")}f.push("")}f.push("",''+l.options+"");this.getContentElement("info","charContainer").getElement().setHtml(f.join(""))},contents:[{id:"info",label:i.lang.common.generalTab, +title:i.lang.common.generalTab,padding:0,align:"top",elements:[{type:"hbox",align:"top",widths:["320px","90px"],children:[{type:"html",id:"charContainer",html:"",onMouseover:g,onMouseout:d,focus:function(){var c=this.getElement().getElementsByTag("a").getItem(0);setTimeout(function(){c.focus();g(null,c)},0)},onShow:function(){var c=this.getElement().getChild([0,0,0,0,0]);setTimeout(function(){c.focus();g(null,c)},0)},onLoad:function(c){e=c.sender}},{type:"hbox",align:"top",widths:["100%"],children:[{type:"vbox", +align:"top",children:[{type:"html",html:"

    "},{type:"html",id:"charPreview",className:"cke_dark_background",style:"border:1px solid #eeeeee;font-size:28px;height:40px;width:70px;padding-top:9px;font-family:'Microsoft Sans Serif',Arial,Helvetica,Verdana;text-align:center;",html:"
     
    "},{type:"html",id:"htmlPreview",className:"cke_dark_background",style:"border:1px solid #eeeeee;font-size:14px;height:20px;width:70px;padding-top:2px;font-family:'Microsoft Sans Serif',Arial,Helvetica,Verdana;text-align:center;", +html:"
     
    "}]}]}]}]}]}}); \ No newline at end of file diff --git a/ckeditor/plugins/table/dialogs/table.js b/ckeditor/plugins/table/dialogs/table.js new file mode 100644 index 0000000..6f65681 --- /dev/null +++ b/ckeditor/plugins/table/dialogs/table.js @@ -0,0 +1,21 @@ +/* + Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +(function(){function r(a){for(var e=0,l=0,k=0,m,g=a.$.rows.length;kl&&(l=e)}return l}function o(a){return function(){var e=this.getValue(),e=!!(CKEDITOR.dialog.validate.integer()(e)&&0n.getSize("width")?"100%":500:0,getValue:q,validate:CKEDITOR.dialog.validate.cssLength(a.lang.common.invalidCssLength.replace("%1",a.lang.common.width)),onChange:function(){var a=this.getDialog().getContentElement("advanced","advStyles");a&& +a.updateStyle("width",this.getValue())},setup:function(a){this.setValue(a.getStyle("width"))},commit:k}]},{type:"hbox",widths:["5em"],children:[{type:"text",id:"txtHeight",requiredContent:"table{height}",controlStyle:"width:5em",label:a.lang.common.height,title:a.lang.common.cssLengthTooltip,"default":"",getValue:q,validate:CKEDITOR.dialog.validate.cssLength(a.lang.common.invalidCssLength.replace("%1",a.lang.common.height)),onChange:function(){var a=this.getDialog().getContentElement("advanced","advStyles"); +a&&a.updateStyle("height",this.getValue())},setup:function(a){(a=a.getStyle("height"))&&this.setValue(a)},commit:k}]},{type:"html",html:" "},{type:"text",id:"txtCellSpace",requiredContent:"table[cellspacing]",controlStyle:"width:3em",label:a.lang.table.cellSpace,"default":a.filter.check("table[cellspacing]")?1:0,validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidCellSpacing),setup:function(a){this.setValue(a.getAttribute("cellSpacing")||"")},commit:function(a,d){this.getValue()?d.setAttribute("cellSpacing", +this.getValue()):d.removeAttribute("cellSpacing")}},{type:"text",id:"txtCellPad",requiredContent:"table[cellpadding]",controlStyle:"width:3em",label:a.lang.table.cellPad,"default":a.filter.check("table[cellpadding]")?1:0,validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidCellPadding),setup:function(a){this.setValue(a.getAttribute("cellPadding")||"")},commit:function(a,d){this.getValue()?d.setAttribute("cellPadding",this.getValue()):d.removeAttribute("cellPadding")}}]}]},{type:"html",align:"right", +html:""},{type:"vbox",padding:0,children:[{type:"text",id:"txtCaption",requiredContent:"caption",label:a.lang.table.caption,setup:function(a){this.enable();a=a.getElementsByTag("caption");if(0"+h.widthPx}]},f,{type:"select",id:"wordWrap",label:c.wordWrap,"default":"yes",items:[[c.yes,"yes"],[c.no,"no"]],setup:d(function(a){var b=a.getAttribute("noWrap");if("nowrap"==a.getStyle("white-space")|| +b)return"no"}),commit:function(a){"no"==this.getValue()?a.setStyle("white-space","nowrap"):a.removeStyle("white-space");a.removeAttribute("noWrap")}},f,{type:"select",id:"hAlign",label:c.hAlign,"default":"",items:[[e.notSet,""],[e.alignLeft,"left"],[e.alignCenter,"center"],[e.alignRight,"right"]],setup:d(function(a){var b=a.getAttribute("align");return a.getStyle("text-align")||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("text-align",b):a.removeStyle("text-align");a.removeAttribute("align")}}, +{type:"select",id:"vAlign",label:c.vAlign,"default":"",items:[[e.notSet,""],[e.alignTop,"top"],[e.alignMiddle,"middle"],[e.alignBottom,"bottom"],[c.alignBaseline,"baseline"]],setup:d(function(a){var b=a.getAttribute("vAlign"),a=a.getStyle("vertical-align");switch(a){case "top":case "middle":case "bottom":case "baseline":break;default:a=""}return a||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("vertical-align",b):a.removeStyle("vertical-align");a.removeAttribute("vAlign")}}]},f,{type:"vbox", +padding:0,children:[{type:"select",id:"cellType",label:c.cellType,"default":"td",items:[[c.data,"td"],[c.header,"th"]],setup:d(function(a){return a.getName()}),commit:function(a){a.renameNode(this.getValue())}},f,{type:"text",id:"rowSpan",label:c.rowSpan,"default":"",validate:i.integer(c.invalidRowSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("rowSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("rowSpan",this.getValue()):a.removeAttribute("rowSpan")}}, +{type:"text",id:"colSpan",label:c.colSpan,"default":"",validate:i.integer(c.invalidColSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("colSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("colSpan",this.getValue()):a.removeAttribute("colSpan")}},f,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"bgColor",label:c.bgColor,"default":"",setup:d(function(a){var b=a.getAttribute("bgColor");return a.getStyle("background-color")|| +b}),commit:function(a){this.getValue()?a.setStyle("background-color",this.getValue()):a.removeStyle("background-color");a.removeAttribute("bgColor")}},k?{type:"button",id:"bgColorChoose","class":"colorChooser",label:c.chooseColor,onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){g.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","bgColor").setValue(a);this.focus()},this)}}:f]},f,{type:"hbox",padding:0,widths:["60%","40%"], +children:[{type:"text",id:"borderColor",label:c.borderColor,"default":"",setup:d(function(a){var b=a.getAttribute("borderColor");return a.getStyle("border-color")||b}),commit:function(a){this.getValue()?a.setStyle("border-color",this.getValue()):a.removeStyle("border-color");a.removeAttribute("borderColor")}},k?{type:"button",id:"borderColorChoose","class":"colorChooser",label:c.chooseColor,style:(m?"margin-right":"margin-left")+": 10px",onLoad:function(){this.getElement().getParent().setStyle("vertical-align", +"bottom")},onClick:function(){g.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","borderColor").setValue(a);this.focus()},this)}}:f]}]}]}]}],onShow:function(){this.cells=CKEDITOR.plugins.tabletools.getSelectedCells(this._.editor.getSelection());this.setupContent(this.cells)},onOk:function(){for(var a=this._.editor.getSelection(),b=a.createBookmarks(),c=this.cells,d=0;d
    '),d='';a.image&&b&&(d+='');d+='");k.on("click",function(){p(a.html)});return k}function p(a){var b=CKEDITOR.dialog.getCurrent();b.getValueOf("selectTpl","chkInsertOpt")?(c.fire("saveSnapshot"),c.setData(a,function(){b.hide();var a=c.createRange();a.moveToElementEditStart(c.editable());a.select();setTimeout(function(){c.fire("saveSnapshot")},0)})):(c.insertHtml(a),b.hide())}function i(a){var b=a.data.getTarget(), +c=g.equals(b);if(c||g.contains(b)){var d=a.data.getKeystroke(),f=g.getElementsByTag("a"),e;if(f){if(c)e=f.getItem(0);else switch(d){case 40:e=b.getNext();break;case 38:e=b.getPrevious();break;case 13:case 32:b.fire("click")}e&&(e.focus(),a.data.preventDefault())}}}var h=CKEDITOR.plugins.get("templates");CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(h.path+"dialogs/templates.css"));var g,h="cke_tpl_list_label_"+CKEDITOR.tools.getNextNumber(),f=c.lang.templates,l=c.config;return{title:c.lang.templates.title, +minWidth:CKEDITOR.env.ie?440:400,minHeight:340,contents:[{id:"selectTpl",label:f.title,elements:[{type:"vbox",padding:5,children:[{id:"selectTplText",type:"html",html:""+f.selectPromptMsg+""},{id:"templatesList",type:"html",focus:!0,html:'
    '+f.options+""},{id:"chkInsertOpt",type:"checkbox",label:f.insertOption, +"default":l.templates_replaceContent}]}]}],buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var a=this.getContentElement("selectTpl","templatesList");g=a.getElement();CKEDITOR.loadTemplates(l.templates_files,function(){var b=(l.templates||"default").split(",");if(b.length){var c=g;c.setHtml("");for(var d=0,h=b.length;d'+f.emptyListMsg+"")});this._.element.on("keydown",i)},onHide:function(){this._.element.removeListener("keydown",i)}}})})(); \ No newline at end of file diff --git a/ckeditor/plugins/templates/templates/default.js b/ckeditor/plugins/templates/templates/default.js new file mode 100644 index 0000000..d8c172e --- /dev/null +++ b/ckeditor/plugins/templates/templates/default.js @@ -0,0 +1,6 @@ +/* + Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.addTemplates("default",{imagesPath:CKEDITOR.getUrl(CKEDITOR.plugins.getPath("templates")+"templates/images/"),templates:[{title:"Image and Title",image:"template1.gif",description:"One main image with a title and text that surround the image.",html:'

    Type the title here

    Type the text here

    '},{title:"Strange Template",image:"template2.gif",description:"A template that defines two colums, each one with a title, and some text.", +html:'

    Title 1

    Title 2

    Text 1Text 2

    More text goes here.

    '},{title:"Text and Table",image:"template3.gif",description:"A title with some text and a table.",html:'

    Title goes here

    Table title
       
       
       

    Type the text here

    '}]}); \ No newline at end of file diff --git a/ckeditor/plugins/templates/templates/images/template1.gif b/ckeditor/plugins/templates/templates/images/template1.gif new file mode 100644 index 0000000000000000000000000000000000000000..efdabbebd4503ceb55c948fa73b9b83cbd373e57 GIT binary patch literal 375 zcmV--0f_!bNk%w1VPpVC0FeLyva+%O00960{{R30A^8LV00000EC2ui0Av7000092 zgpaAq?GK}zwAu@W-n{z{hT=$;9b%^H%BpA!$8!13_AS@=&Xal%3~GMDB95pDD3{Ep z^T{;k4xj+g%7JRP+$IPq!1Bb&uKB$DQa@x|8x8NO4b`hO25#TOnRw~9=3yE0xyeE4CQ8$(2)Mz>8udZCXX=BRr7DZbW_#-a zYZEHlJM(KAEc4dditDMnJ4(CC+&uK06fIp0D*Z|wX5EYpGb{?;a*WKVoEoWp!Y!`y zeo4*}FFC(bZf@duda#%D-q zaHzPUxA@lRm;@PFNk%w1VPpVC0FeLyva+%O00960{{R30A^8LV00000EC2ui0Av7000092 zgpaAq?GK}zwAu@W-n{z{hT=$;9b%^H%BpA!$8!13_AS@=&Xal%3~GMDB93TG#*l%g z^9hYgr_`$T`us4l+^+W<)gC_JviY3#AeC&_xD98m<8-m1jvsB&<_@0q~XXRsCap^IRqK$(K#c!N9pBf82AawVH$?WN){q&IjedXiz+EX zOS+od%WDgp+d909toAG5`lTy-9D18rOxWx+T}>D*o&1Qa9n5V^96nACtqfi*?*05t zZSMX~zfpQ^<%jRPUfiDEO8=eEuB)DKv}S_cJW8uTxqL`=(AMXYB~Aenu4SM=e_ zrj6M`kqsZ_xrlC}y^5evW>krApudqWP2zFM5Fo{b%sA$2wGU)SI5vkKVQCad(WEn$ zGF`IFr&KONpB8ayRSwduHn4I{;q@zxs8h=VDkqjl*t8(;n#c+zd*_U=jy QeEa(S3plV~2n7HDJNoX*`2YX_ literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/templates/templates/images/template4.gif b/ckeditor/plugins/templates/templates/images/template4.gif new file mode 100644 index 0000000000000000000000000000000000000000..28c5d1f80df0bdb3b4767f1ce8520c27f61c1b6d GIT binary patch literal 7570 zcmdUzXH-*Ln}94DkzrwBnV6V3IXOvBPq((VZf|e*_V(7( z(;FHZLLd<3<>dqf1l85mXf(REwzj#s`Rwcr27`@^i~xZ^2?+@}99~#hc;(6!Vq)Ub z(o%VOc_JdBva&KWGqX2u-e548oSdAkt*wKD16o>I5C{|+8v5eJiw_?@fWhFvz(7Jm z!j6s(3JMBFM#k&cuk-Tqs;jHh(b2WFwULsNvazu(E-oe{Bse-cR#a2~002B5e{ueQ z(eC3Z^wcz&WKEn+F0K+%?hYoV*5=MkZ_VFZ+DS6+BGJrDmS&R7x`Jw8HHT;B7M6-0 zj^e{9r)~2Fn%u-L7B;3W^Z5?dQolThBZEftF#M~vBP0Z}ynu}fBUv~2{GyM^9 z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J+E0KO`=^-5=PA{XwRzy8Wb^}RJ?2UMty`*`)sfGoq2Ze z#H?-E83K(xukmUy@_OE%SAT%_cod_~I^e-BrOuh?(%wgNKrf( zJZ?`o_A|y)a7&*wnVp14QP5!Bc>lKNc>d_ zVg*zc(!_jeG?vZA)Jp7<Y!l_ng5@gY;C}<#_{;`$ z(_g^01cs=r`qqcPB(|TshW{eAO`|nE)0f0He)h*7VvAmd&u?E4+lHNAm&A7asB{kt zAR_k~wf{qGb2uQISuG(n<9v~q#5VN$bJ2#*a?{GlOJYk$omUj~P^(zm-0_mw+Ezad z;xFh+i+i_pL2OwcX5?657`m^sT@YJ)5XmEfqLBpo9OVqb-w}tpa!SA7Gon`Ulv)FHDt+xTjVx z@NKZ*64<8R-5k3Fwy(DZWBw4^Bnj(FVjEyx!F@?=;b9Mq`x{QpSNboAE%hC-OJWPG zhBhLPcbV$~E{N@!^#1BdiE#|IB=&f3S;|2EFJikjKY&JG;4)ISg};d{3uM8cQfPf4 pfJXi=V!If0=N)7*n89^@G2|~|n`E&R##R7X3g@b^c*_J3{|{RfioyT@ literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/templates/templates/images/template5.gif b/ckeditor/plugins/templates/templates/images/template5.gif new file mode 100644 index 0000000000000000000000000000000000000000..dacd875b4193829753bf0d6c6054cfff16d97aa7 GIT binary patch literal 6418 zcmbVObzGF)vnNF95Cs7d1d(34mQv|dxgs9&0s=f9f7RZ{ zQ<&;JV^_BIw7vSvDf+tE+Jix!>~^%aD| zIscKM41(KxIJq@bTtZmlv4pb7 zKQjIkudu4Ls-%**u!^X%s)&e+h`8kAe|R;Za8FyPJ?I}?=PTU5 zdBs%!PhOys2gueF=3xkfx&9LY&zxYMFt`)Uja|t=lAXuI8R`J@f%E>^p1-YC26;Gp zgB(;nU=a4d{0nsc5BN%=;;PbO%A(3r|C`-^^E&*0d?s|IjL@Ip_#eUY&(u`}{^|ZZ z^sfg0P96~SDq}pZQiBkGd2xPr`upV9&mZ5vef{$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W9s8Cfa82C0s`6p0@+SZ2LJ#7 literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/templates/templates/images/template6.gif b/ckeditor/plugins/templates/templates/images/template6.gif new file mode 100644 index 0000000000000000000000000000000000000000..fa4a386c0e87b4003f93c0ce3727197139a95080 GIT binary patch literal 2726 zcmbtVdpy%^8y|&GPx7RrYUWU$?8r7-vgARm5NzN?` z6>>-pJ)?t?L~oNd=NuA|@=m4q{iDzG$NS!&-{<$c?)$#J*Y~>a>$>hA$$@B&qcnly zKy4sUYilbM3S}@DNl8f)6BDzuv*Y9AGMQ|6c(}8(b8>QWW@ct;YO157LoSya7#OTy zzg}HkU0Yk*&CRW#pddUvysfQmY-}tvG_0aGM`Q3PEcp9?DA>3(AG|Yx_?=5JvxLz3d=4HC7YGC}fhmm5^@SsGINZDq z6bh=)fbxP^e2Ngt;^{9~AOJinm%-sP*evk8MT$53Fy9iQ@bp^8-L%^BL`MADn^Z3rdf86+~HqSMP1HhdD9{Vtt3Mka|7r=_M`)8tgMTIx` z-CTwuDU<*Ln|hcDu=oxHONe3zMq|+MSfm*NWn*VUK-r<}Fi510DH>sGW{omKBhc1p z0&>B|&#*Q)GgE>M4r_-Z*ddX27@R5Elz>K?+MvydL>s#wSO*r5PhnAk1zv`N_d6Ez zk664d7ohOjTvs+bV4(t>=xjclM`v@uwk{a(7B>cq#uo65=hO2oS^~gj1OhZ7m(2u! zJzqTIC;UVd0%3zeUv_{Hef_UjU7asGUbH`Nd-k;T z$>T>4Tbd<*KWJ)fsJ~x#uePST>TYF4`JLOh%1TRaii>ZEt``*+(tq z#-;R&X{jj}l9SG#J9{QEA^xw^aj`L{PM(O4iaZ_>9(F7=gFT68N3gZA{@rT3rNuTp z&K!$Do0+1J2sjLCvh_FPEt`!D4fG*;;7uDh=&oP4cFpQlIxBzGUZJ)8mt{*eHPn}= zsj4hqq^tx2=}j;GdPAAazvu5vkm_7bBFEljU3}A3?t=h)#^YT6jv{x_i^9NIa!|GO zhR_j~_N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7.gif b/ckeditor/plugins/templates/templates/images/template7.gif new file mode 100644 index 0000000000000000000000000000000000000000..0e2f686b3c5f6a1eb07fa3811b936c25936d0400 GIT binary patch literal 2479 zcmbVNc|4SR7awb7t0bYtG?oxE^9+WW5@yC)QYczpZ)4`cV3s>Gn5@GsWUUm5vJ{DH zYzf&(*$Q)>|1WRqtg5S(R=@RpU?C8J-_9A&-a}3JLfzWR_2BnViP19@(=>) z?Cj+8`E6}&y1KeLIy%puJxfSPpin5awYB5pi0N=kx2AS){?f^qkXq?64ND1pc( z3cmY|ISeAn6J$eOKsO4_2sTks1A|h?MleTx8>9^b54uw<{g|M=-(d%mpC<`Jh8Z7# z?&n}RR0b7f6QLZc7mbDG7{Q2Sx(kRE%vZM&Fz7cCwxYez8u!6jH3!Q9zw1{Q(v z_4S4O>cZ(vHw1veU{-aYP&xt$9oAVIo5<0ju~gPH5I`1*Nnx-lbQ*M3BhiKK%{GDw zEdA~Rm0@G^Q!$MN|K<>!M5iJ+LYM5lfHfVz!kQYI;S2#o0g_+_0A^?$(hR^8(B^1@Inoq|L#<)0 zXe>67MgrG(DFWUfSl}PASUeLXvgu3*I^An61CF@U*>sjWodLz$qoEp(6dIZC%hFuE zp6}igKqkcpB%3qoROq+(Vky7i*V8x0<56Y+0rS87{*ER8KQTiHj6tj>$A2Zu+Lj;# zSEoNyU$FRDJRnU_F-$>e2(5hm^4Id`rNxE$x!IZNsmX~?;~&RHKfE6q9(p%8@Rr~I zrtkHu-k$E4FS`DG{;ad3{ppjo)|Td`$B!BxHq_VE)>KzjRy-&#E4^QGuehkNAfK1_ zM{dsD>^oVRw{K;nr={M!k&=8p=~`mK)hqFrFI|j_jfswmybuu{cK+P&p&{Jhpuhls zzq1@)A8$5``5S{yqk4IIP~6>IK{CmOc;?^E|2lo@EEbi|>#N|*xSo;Nrd?jc6_MN(9Wv2d$~ab{7GXGrD7V|b??usK zMrLe0)s&`%nYr4sVYl*ZiWu9fQ|4^8b6-YB+RFlxBrYcD-uRhY^fBkF{-t!Cs$j`{ z*?_X&_B6)rwY?lr&I(pZJ?Iwd!JQlHF81tyT2-+y!EcCCwymyQ`m_yhQL0i=wY)Gn z*qYiNKJT|tczUeAy{1O+pApyKb4BId`627o*Qc$BjM|JqSx1dDb~}{VxD#3OTBWhh zJAB^14TpwBIEqMrHR-;fk(E6VsV$>!azW8Gf*9TK#Bz|1ep7ZT7W*bl!qY@t^W8-R z6hex7J{57>%^Hq55r0@+9K7ObV+A^8KTID=IPLRcDDli?AY5Cf(``7(J?n0k@;q^% zIhpZDb0mfRqNhpJ!kLnC)z7-oEfw=+L$*bzj7O)wj(X1fjA(S^lPI!_`oQfg$2~q| zj$c&x5E%AJfq3WsRtYU!My%2%Ep%qiXwDz^M@MrDij?XuS$BDi<&_QRjPWW5BusB+ zp_V8Gv7q8`;SN=#XwhS>?dL?=LNUXdU@s+aMOaL#Go-}FW$!s5S;oOVY8F1+O+q~q zM7ZhuAb$vn`n7;&GM?j4dtjn4$pe#x0ffn%_|$};o1`Hshu-Ao)tl~ULzG;T4meyl zjY^rQPFHJ#SARX}g?w~}atQHwEBzz9{!7CC>3VeoscDO;-nWG2!KsA3HJGwcZSMj02zHDJ4I+gd=IDsS+fT(}zjPduZ-V-?A8{Asu&)t%I z;_d(*AGFkx5?2k3=1)j!t>2_6B7%R2FqWEKS6BN5sc@oX`IwSCYh6$norRsuX1j`}F#)ks0UV cZNgF{j@Z|p$uPsVbQ#~KhF#TAQOLf(0cvzWUH||9 literal 0 HcmV?d00001 diff --git a/ckeditor/plugins/templates/templates/images/template8.gif b/ckeditor/plugins/templates/templates/images/template8.gif new file mode 100644 index 0000000000000000000000000000000000000000..f87134bccbb12cdbe47ca73401e1495e0ea648cf GIT binary patch literal 2940 zcmbtUc|6qX8mHt~rc&pGR2oBtFq;_+62@4YNM2sv;^HEQ z!xrPrYklq=f4gAmDch{kkqle|rPCt!YT6;(-V?xT+Hb3I!sOYEX3q5(!lS z!XQu>7{dRMs!(+l0*QiY0RL4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al 0 HcmV?d00001 diff --git a/ckeditor/plugins/wsc/LICENSE.md b/ckeditor/plugins/wsc/LICENSE.md new file mode 100644 index 0000000..c7d374a --- /dev/null +++ b/ckeditor/plugins/wsc/LICENSE.md @@ -0,0 +1,28 @@ +Software License Agreement +========================== + +**CKEditor WSC Plugin** +Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved. + +Licensed under the terms of any of the following licenses at your choice: + +* GNU General Public License Version 2 or later (the "GPL"): + http://www.gnu.org/licenses/gpl.html + +* GNU Lesser General Public License Version 2.1 or later (the "LGPL"): + http://www.gnu.org/licenses/lgpl.html + +* Mozilla Public License Version 1.1 or later (the "MPL"): + http://www.mozilla.org/MPL/MPL-1.1.html + +You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. + +Sources of Intellectual Property Included in this plugin +-------------------------------------------------------- + +Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission. + +Trademarks +---------- + +CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. diff --git a/ckeditor/plugins/wsc/README.md b/ckeditor/plugins/wsc/README.md new file mode 100644 index 0000000..46eeafb --- /dev/null +++ b/ckeditor/plugins/wsc/README.md @@ -0,0 +1,25 @@ +CKEditor WebSpellChecker Plugin +=============================== + +This plugin brings Web Spell Checker (WSC) into CKEditor. + +WSC is "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution. + +Installation +------------ + +1. Clone/copy this repository contents in a new "plugins/wsc" folder in your CKEditor installation. +2. Enable the "wsc" plugin in the CKEditor configuration file (config.js): + + config.extraPlugins = 'wsc'; + +That's all. WSC will appear on the editor toolbar and will be ready to use. + +License +------- + +Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). + +See LICENSE.md for more information. + +Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/). diff --git a/ckeditor/plugins/wsc/dialogs/ciframe.html b/ckeditor/plugins/wsc/dialogs/ciframe.html new file mode 100644 index 0000000..82df25b --- /dev/null +++ b/ckeditor/plugins/wsc/dialogs/ciframe.html @@ -0,0 +1,66 @@ + + + + + + + + +

    + diff --git a/ckeditor/plugins/wsc/dialogs/tmpFrameset.html b/ckeditor/plugins/wsc/dialogs/tmpFrameset.html new file mode 100644 index 0000000..c2d82aa --- /dev/null +++ b/ckeditor/plugins/wsc/dialogs/tmpFrameset.html @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + diff --git a/ckeditor/plugins/wsc/dialogs/wsc.css b/ckeditor/plugins/wsc/dialogs/wsc.css new file mode 100644 index 0000000..496d731 --- /dev/null +++ b/ckeditor/plugins/wsc/dialogs/wsc.css @@ -0,0 +1,82 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +html, body +{ + background-color: transparent; + margin: 0px; + padding: 0px; +} + +body +{ + padding: 10px; +} + +body, td, input, select, textarea +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; +} + +.midtext +{ + padding:0px; + margin:10px; +} + +.midtext p +{ + padding:0px; + margin:10px; +} + +.Button +{ + border: #737357 1px solid; + color: #3b3b1f; + background-color: #c7c78f; +} + +.PopupTabArea +{ + color: #737357; + background-color: #e3e3c7; +} + +.PopupTitleBorder +{ + border-bottom: #d5d59d 1px solid; +} +.PopupTabEmptyArea +{ + padding-left: 10px; + border-bottom: #d5d59d 1px solid; +} + +.PopupTab, .PopupTabSelected +{ + border-right: #d5d59d 1px solid; + border-top: #d5d59d 1px solid; + border-left: #d5d59d 1px solid; + padding: 3px 5px 3px 5px; + color: #737357; +} + +.PopupTab +{ + margin-top: 1px; + border-bottom: #d5d59d 1px solid; + cursor: pointer; +} + +.PopupTabSelected +{ + font-weight: bold; + cursor: default; + padding-top: 4px; + border-bottom: #f1f1e3 1px solid; + background-color: #f1f1e3; +} diff --git a/ckeditor/plugins/wsc/dialogs/wsc.js b/ckeditor/plugins/wsc/dialogs/wsc.js new file mode 100644 index 0000000..443145c --- /dev/null +++ b/ckeditor/plugins/wsc/dialogs/wsc.js @@ -0,0 +1,74 @@ +/* + Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +(function(){function y(a){if(!a)throw"Languages-by-groups list are required for construct selectbox";var c=[],d="",f;for(f in a)for(var g in a[f]){var h=a[f][g];"en_US"==h?d=h:c.push(h)}c.sort();d&&c.unshift(d);return{getCurrentLangGroup:function(c){a:{for(var d in a)for(var f in a[d])if(f.toUpperCase()===c.toUpperCase()){c=d;break a}c=""}return c},setLangList:function(){var c={},d;for(d in a)for(var f in a[d])c[a[d][f]]=f;return c}()}}var e=function(){var a=function(a,b,f){var f=f||{},g=f.expires; +if("number"==typeof g&&g){var h=new Date;h.setTime(h.getTime()+1E3*g);g=f.expires=h}g&&g.toUTCString&&(f.expires=g.toUTCString());var b=encodeURIComponent(b),a=a+"="+b,e;for(e in f)b=f[e],a+="; "+e,!0!==b&&(a+="="+b);document.cookie=a};return{postMessage:{init:function(a){window.addEventListener?window.addEventListener("message",a,!1):window.attachEvent("onmessage",a)},send:function(a){var b=Object.prototype.toString,f=a.fn||null,g=a.id||"",e=a.target||window,i=a.message||{id:g};a.message&&"[object Object]"== +b.call(a.message)&&(a.message.id||(a.message.id=g),i=a.message);a=window.JSON.stringify(i,f);e.postMessage(a,"*")},unbindHandler:function(a){window.removeEventListener?window.removeEventListener("message",a,!1):window.detachEvent("onmessage",a)}},hash:{create:function(){},parse:function(){}},cookie:{set:a,get:function(a){return(a=document.cookie.match(RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)")))?decodeURIComponent(a[1]):void 0},remove:function(c){a(c,"",{expires:-1})}}, +misc:{findFocusable:function(a){var b=null;a&&(b=a.find("a[href], area[href], input, select, textarea, button, *[tabindex], *[contenteditable]"));return b},isVisible:function(a){return!(0===a.offsetWidth||0==a.offsetHeight||"none"===(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null).display:a.currentStyle?a.currentStyle.display:a.style.display))},hasClass:function(a,b){return!(!a.className||!a.className.match(RegExp("(\\s|^)"+b+"(\\s|$)")))}}}}(), +a=a||{};a.TextAreaNumber=null;a.load=!0;a.cmd={SpellTab:"spell",Thesaurus:"thes",GrammTab:"grammar"};a.dialog=null;a.optionNode=null;a.selectNode=null;a.grammerSuggest=null;a.textNode={};a.iframeMain=null;a.dataTemp="";a.div_overlay=null;a.textNodeInfo={};a.selectNode={};a.selectNodeResponce={};a.langList=null;a.langSelectbox=null;a.banner="";a.show_grammar=null;a.div_overlay_no_check=null;a.targetFromFrame={};a.onLoadOverlay=null;a.LocalizationComing={};a.OverlayPlace=null;a.LocalizationButton={ChangeTo:{instance:null, +text:"Change to"},ChangeAll:{instance:null,text:"Change All"},IgnoreWord:{instance:null,text:"Ignore word"},IgnoreAllWords:{instance:null,text:"Ignore all words"},Options:{instance:null,text:"Options",optionsDialog:{instance:null}},AddWord:{instance:null,text:"Add word"},FinishChecking:{instance:null,text:"Finish Checking"}};a.LocalizationLabel={ChangeTo:{instance:null,text:"Change to"},Suggestions:{instance:null,text:"Suggestions"}};var z=function(b){var c,d;for(d in b)c=b[d].instance.getElement().getFirst()|| +b[d].instance.getElement(),c.setText(a.LocalizationComing[d])},A=function(b){for(var c in b){if(!b[c].instance.setLabel)break;b[c].instance.setLabel(a.LocalizationComing[c])}},j,q;a.framesetHtml=function(b){return"'};a.setIframe=function(b,c){var d;d=a.framesetHtml(c);var f=a.iframeNumber+"_"+c;b.getElement().setHtml(d); +d=document.getElementById(f);d=d.contentWindow?d.contentWindow:d.contentDocument.document?d.contentDocument.document:d.contentDocument;d.document.open();d.document.write('iframe
    \ No newline at end of file diff --git a/updatefiles/application_helper.rb b/updatefiles/application_helper.rb new file mode 100644 index 0000000..089eaab --- /dev/null +++ b/updatefiles/application_helper.rb @@ -0,0 +1,646 @@ +# encoding: utf-8 +require "json" +module ApplicationHelper + def render_widget(widget) + file = File.join(Rails.root, "app", "templates", "#{@key}", "modules/#{widget}") + render :partial => file + end + + def render_partial(partial) + file = File.join(Rails.root, "app", "templates", "#{@key}", "partial/_#{partial}.html.erb") + render :file => file + end + + def link_to_show(module_name) + "/module/#{module_name}/show" + end + + def render_header + site = current_site + header_file = File.join(Rails.root, "app", "templates", "#{@key}", "/home/header.html.erb") + header_file_html = render :file => header_file + header = Nokogiri::HTML(header_file_html, nil, "UTF-8") + site_logo = header.css("img[src='{{logo_url}}']")[0] + if !site_logo.nil? + site_logo.remove if site.site_logo.url.nil? + end + sub_menu_html = site.sub_menu + html = header.to_s + t = site.title rescue "" + html = html.gsub("{{site_name}}",(site.display_title_in_frontend ? t : "")) + html = html.gsub("%7B%7Blogo_url%7D%7D",((site.site_logo.url.nil? ? "/assets/default-site-logo.png" : site.site_logo.url) rescue "/assets/default-site-logo.pngs")) + html = html.gsub("%7B%7Blogo_url_1%7D%7D",((site.site_logo_1.url.nil? ? "/assets/default-site-logo.png" : site.site_logo_1.url) rescue "/assets/default-site-logo.pngs")) + html = html.gsub("%7B%7Bhome_link%7D%7D",((site.home_link.strip.empty? ? "/" : site.home_link) rescue "/")) + html = html.gsub("%7B%7Bhome_link_1%7D%7D",((site.home_link_1.strip.empty? ? "/" : site.home_link_1) rescue "/")) + html = html.gsub("{{site_title}}",((site.site_title[I18n.locale.to_s].strip.empty? ? "home_page" : site.site_title[I18n.locale.to_s]) rescue "home_page")) + html = html.gsub("{{site_title_1}}",((site.site_title_1[I18n.locale.to_s].strip.empty? ? "home_page" : site.site_title_1[I18n.locale.to_s]) rescue "home_page")) + if site.sitemap_menu_in_header + sitemap = Page.find_by_key(:sitemap).name rescue "Sitemap" + sub_menu_html = sub_menu_html + "#{sitemap}" + end + sub_menu_html = sub_menu_html.nil? ? "" : sub_menu_html + html = html.gsub("{{header-data}}",sub_menu_html) + html.html_safe + end + + def render_site_title + site = current_site + title = site.title rescue "" + if site.title_always_on + if !params[:slug].nil? + temp_title = params[:slug].sub("-#{params[:uid]}","") + temp_title = temp_title.gsub("-"," ") + title = "#{temp_title} | #{title}" + elsif params[:target_action] == "index" + temp_title = Page.find_by(:page_id => params[:page_id]).name + title = "#{temp_title} | #{title}" + end + end + title + end + + def render_every_page_sharer + site = current_site + html = "" + html.html_safe + end + + def render_google_analytics + html = current_site.google_analytics rescue "" + metas = current_site.meta_tags.split("\r\n") rescue [] + metas.each do |meta| + m = meta.split(" ::: ") + html = html + "" + end + html.html_safe rescue "" + end + + def render_footer + site = current_site + footer_file = File.join('../templates', "#{@key}", "/home/footer.html.erb") + footer_file_html = render :file => footer_file + footer = Nokogiri::HTML(footer_file_html, nil, "UTF-8") + html = footer.to_s + site_footer = site.footer + if site.enable_terms_of_use + site_footer = site_footer + "Terms of use" + end + site_footer = site_footer.nil? ? "" : site_footer + html = html.gsub("{{footer-data}}",site_footer) + counter = Page.root.view_count.to_s rescue "" + counter = t(:visitors_count) + " : " + counter + html = html.gsub("{{site-counter}}",counter) + + if site.enable_last_update + updated_at = get_last_updated.first.updated_at.to_s rescue "" + updated_at = t(:last_updated_at) + " : " + updated_at + "" if updated_at != "" + html = html.gsub("{{last-updated}}",updated_at) + else + html = html.gsub("{{last-updated}}","") + end + + html.html_safe + end + + def get_last_updated + apps = ['bulletin', 'page_context', 'web_link'] + a = {} + apps.each do |module_app| + module_app_class = module_app.classify.constantize rescue nil + if !module_app_class.nil? + objects = module_app_class.order_by([:updated_at, :desc]).limit(1) + objects.each do |object| + a.merge!(object => object.updated_at) unless (object.archived rescue nil) + end + end + end + sorted_objects = a.sort {|a,b| b[1]<=>a[1]} + return sorted_objects.first + end + + def render_social_share + site = current_site + share_file = File.join('../templates', "#{@key}", "/home/socialshare.html.erb") + share_file_html = render :file => share_file + sharer = Nokogiri::HTML(share_file_html, nil, "UTF-8") + html = sharer.to_s + site_sharer = site.social_share + site_sharer = site_sharer.nil? ? "" : site_sharer + html = html.gsub("{{social-share-data}}",site_sharer) + html.html_safe + end + + def render_orbit_bar + if is_mobile_layout_active + orbit_bar_file = File.join('../views', "orbit_bar", 'index_mobile.html.erb') + else + orbit_bar_file = File.join('../views', "orbit_bar", 'index.html.erb') + end + orbit_bar_file_html = render :file => orbit_bar_file + orbit_bar_file_html.html_safe + end + + def render_menu + # menu_html = Rails.cache.fetch(['main_menu',request.original_fullpath, I18n.locale], race_condition_ttl: 2.seconds) do + # json_file = File.read(File.join(Rails.root, 'public', "menu.json")) + # @items = JSON.parse(json_file) + if $mobile.blank? + @pages = Page.root.sorted_published_child_pages + else + @pages = Page.root.sorted_published_child_pages_for_mobile + end + + def create_json(pages) + item = {} + pages.each do |page| + next if !page.user_can_access?(current_user) + if page.child_page.size > 0 + if page.page_type == "page" + if $mobile.blank? + item["#{page.page_id}"] = {"name" => page.name, "url"=> "/#{locale.to_s}" + page.url, "children"=>create_json(page.sorted_published_child_pages), "target" => "_self"} + else + item["#{page.page_id}"] = {"name" => page.name, "url"=> "/#{locale.to_s}" + page.url, "children"=>create_json(page.sorted_published_child_pages_for_mobile), "target" => "_self"} + end + elsif page.page_type == "link" + target = get_target(page.external_url) + if $mobile.blank? + item["#{page.page_id}"] = {"name" => page.name, "url"=> page.external_url, "children"=>create_json(page.sorted_published_child_pages), "target" => target} + else + item["#{page.page_id}"] = {"name" => page.name, "url"=> page.external_url, "children"=>create_json(page.sorted_published_child_pages_for_mobile), "target" => target} + end + end + else + if page.page_type == "page" + item["#{page.page_id}"] = {"name" => page.name, "url"=> "/#{locale.to_s}" + page.url, "target" => "_self"} + elsif page.page_type == "link" + item["#{page.page_id}"] = {"name" => page.name, "url"=> page.external_url, "target" => get_target(page.external_url)} + end + end + end + item + end + @items = create_json(@pages) + menu_file = File.open(File.join(Rails.root, 'app', 'templates', "#{@key}", "/home/menu.html.erb")) + doc = Nokogiri::HTML(menu_file, nil, "UTF-8") + menu_file.close + + temp = [] + @menus = [] + @menus_items = [] + + temp << doc.css("*[data-menu-level='0']") + temp << doc.css("*[data-menu-level='1']") + temp << doc.css("*[data-menu-level='2']") + + + temp[0] = temp[0].to_s.gsub(temp[1].to_s,"{{level}}") + temp[1] = temp[1].to_s.gsub(temp[2].to_s,"{{level}}") + temp[2] = temp[2].to_s + + + temp.each_with_index do |menu,i| + t = Nokogiri::HTML(menu, nil, "UTF-8") + a = t.css("*[data-menu-link='true']") + a[0]["href"] = "href_here" + a[0]["target"] = "target_here" + li = t.css("*[data-menu-level='#{i}'] > *") + @menus_items << li.to_html + ul = t.css("*[data-menu-level='#{i}']") + ul[0].inner_html = "{{here}}" + @menus << ul[0].to_html + end + + def create_menu(items,level) + html = "" + items.each do |key,item| + li = @menus_items[level].gsub("href_here",(item["url"] || "")) + li = li.gsub("{{link_name}}",(item["name"] || "")) + li = li.gsub("target_here",(item["target"] || "")) + li = request.original_fullpath == item['url'] ? li.gsub("{{active}}","active") : li.gsub("{{active}}","") + + if item["children"] && !item["children"].empty? + li = li.gsub("{{level}}",create_menu(item["children"],level + 1)) + else + li = li.gsub("{{level}}","") + end + html = html + li + end + html = @menus[level].gsub("{{here}}",html) + html = html.gsub("{{class_level}}",level.to_s) + html + end + h = create_menu(@items,0) + h.html_safe + # end + + # menu_html + end + + def render_view(overridehtml=nil) + + def render_link_to_edit(html, url_to_edit) + if html.scan("{{link_to_edit}}").length == 0 + html = url_to_edit.blank? ? html : html + "

    #{t(:edit)}

    " + else + html = url_to_edit.blank? ? html.gsub("{{link_to_edit}}","") : html.gsub("{{link_to_edit}}","

    #{t(:edit)}

    ") + end + return html + end + + def parsing_repeats_again(elements,d,level) + newhtml = [] + oldhtml = [] + elements.each do |el| + html_to_render = "" + data_name = el.attr("data-list") + wrap_elements = el.css("*[data-list][data-level='#{level}']") + if d[data_name] + d[data_name].each_with_index do |item,i| + element = el.inner_html + if wrap_elements.count > 0 + htmls = parsing_repeats_again(wrap_elements,d[data_name][i], level + 1) + htmls[0].each_with_index do |html,i| + element = element.gsub(html,htmls[1][i]) + end + end + item.each do |key,value| + if !value.kind_of?(Array) + value = value.nil? ? "" : value + element = element.gsub("{{#{key}}}",value.to_s.html_safe) + element = element.gsub("%7B%7B#{key}%7D%7D",value.to_s.html_safe) + element = render_link_to_edit(element, value) if key.eql?("url_to_edit") + end + end + html_to_render = html_to_render + element + end + temp = el.to_s + oldhtml << temp + temp = temp.gsub(el.inner_html, html_to_render) + newhtml << temp + end + end + [oldhtml,newhtml] + end + + + if params[:target_action] == "index" + filename = overridehtml.nil? ? params[:layout_type] : overridehtml + f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', params[:target_controller].singularize, "#{filename}.html.erb") + if !File.exists?f + f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', params[:target_controller].singularize, "index.html.erb") + if !File.exists?f + return "
    Maybe the administrator has changed the theme, please select the index page design again from the page settings.
    ".html_safe + end + end + file = File.open(f) + doc = Nokogiri::HTML(file, nil, "UTF-8") + file.close + controller = "#{params[:target_controller].capitalize}_controller".classify.constantize.new + begin + data = controller.send("#{params[:target_action]}")# rescue nil + rescue Exception => e + write_debug_file(e,params[:target_controller],params[:target_action]) if Site::DEBUG + end + if !data.nil? + wrap_elements = doc.css("*[data-list][data-level='0']") + htmls = parsing_repeats_again(wrap_elements,data,1) + html = doc.to_s + htmls[0].each_with_index do |h,i| + html = html.gsub(h,htmls[1][i]) + end + extras = data["extras"] || {} + extras["page-title"] = Page.find_by(:page_id => params[:page_id]).name rescue "" if !extras["page-title"] + extras.each do |key,value| + value = value.nil? ? "" : value + html = html.gsub("{{#{key}}}",value.to_s.html_safe) + html = html.gsub("%7B%7B#{key}%7D%7D",value.to_s.html_safe) + end + total_pages = data['total_pages'].to_i rescue 1 + if total_pages > 1 + html = html.gsub("{{pagination_goes_here}}",create_pagination(total_pages)) + else + html = html.gsub("{{pagination_goes_here}}",""); + end + html.html_safe + else + return "
    No content to show.
    ".html_safe + end + else + filename = overridehtml.nil? ? params[:target_action] : overridehtml + f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', params[:target_controller].singularize, "#{filename}.html.erb") + if File.exists?f + file = File.open(f) + doc = Nokogiri::HTML(file, nil, "UTF-8") + file.close + controller = "#{params[:target_controller].capitalize}_controller".classify.constantize.new + begin + data = controller.send("#{params[:target_action]}")# rescue nil + rescue Exception => e + write_debug_file(e,params[:target_controller],params[:target_action]) if Site::DEBUG + end + if data.nil? + return "
    No content to show.
    ".html_safe + end + + if data.blank? || data.empty? + file = File.open("#{Rails.root}/app/views/errors/404.html") + doc = Nokogiri::HTML(file, nil, "UTF-8") + file.close + doc.to_html.html_safe + else + unless data['impressionist'].blank? + Thread.new do + impression = data['impressionist'].impressions.create + impression.user_id = request.session['user_id'] + impression.controller_name = params[:target_controller] + impression.action_name = params[:target_action] + impression.ip_address = request.remote_ip + impression.session_hash = request.session.id + impression.request_hash = @impressionist_hash + impression.referrer = request.referrer + impression.save + end + data['impressionist'].inc(view_count: 1) + data["data"]["view_count"] = data["impressionist"].view_count if data["data"].present? + end + wrap_elements = doc.css("*[data-list][data-level='0']") + if wrap_elements.count == 0 + wrap_element_html = doc.to_s + el = wrap_element_html + data.each do |key,value| + next if key.eql? 'impressionist' + value = value.nil? ? "" : value + el = el.gsub("{{#{key}}}",value.to_s.html_safe) + el = el.gsub("%7B%7B#{key}%7D%7D",value.to_s.html_safe) + end + el.html_safe + else + keys = data.keys + not_array_key = nil + data.keys.each do |key| + not_array_key = key if data["#{key}"].kind_of?(Hash) + end + htmls = parsing_repeats_again(wrap_elements,data,1) + html = doc.to_s + htmls[0].each_with_index do |h,i| + html = html.gsub(h,htmls[1][i]) + end + extras = data["#{not_array_key}"] || {} + extras.each do |key,value| + next if key.eql? 'impressionist' + value = value.nil? ? "" : value + html = html.gsub("{{#{key}}}",value.to_s) + html = html.gsub("%7B%7B#{key}%7D%7D",value.to_s) + end + html = render_link_to_edit(html, data["url_to_edit"]) if !data["url_to_edit"].nil? + total_pages = data['total_pages'].to_i rescue 1 + if total_pages > 1 + html = html.gsub("{{pagination_goes_here}}",create_pagination(total_pages)) + else + html = html.gsub("{{pagination_goes_here}}",""); + end + html.html_safe + end + end + else + return "
    There is a problem with the design. We will try to fix it as soon as possible. Sorry for the inconvenience!! :(
    ".html_safe + end + end + end + + def action_data(overrideaction=nil) + overrideaction = overrideaction.nil? ? params[:target_action] : overrideaction + controller = "#{params[:target_controller].capitalize}_controller".classify.constantize.new + begin + data = controller.send("#{overrideaction}")# rescue nil + rescue Exception => e + write_debug_file(e,params[:target_controller],overrideaction) if Site::DEBUG + end + data + end + + def active_for_controllers(*controller_names) + (controller_names.include?(controller.controller_name) || controller_names.include?(request.fullpath)) ? 'active' : nil + end + + def visible_for_controllers(*controller_names) + (controller_names.include?(controller.controller_name) || controller_names.include?(request.fullpath)) ? '' : 'hide' + end + + def active_for_action(controller_name, action_name) + ((controller.controller_name.eql?(controller_name) || request.fullpath.eql?(controller_name)) && controller.action_name.eql?(action_name)) ? 'active' : nil + end + + def link_back(custom_class=nil, params="") + case custom_class + when nil + link_to t('back'), get_go_back + params, :class => 'nav' + else + link_to t('back'), get_go_back + params, :class => custom_class + end + end + + def switch_language(loc) + url = request.original_fullpath + + locale = url.include?("zh_cn") ? :zh_cn : I18n.locale + + url = url.gsub("/#{locale.to_s}/","/#{loc.to_s}/") + url = url.gsub("locale=#{locale.to_s}","locale=#{loc.to_s}") if url == request.original_fullpath + url = url + "#{url.include?("?") ? "&" : "?"}locale=#{loc.to_s}" if url == request.original_fullpath and (!url.include?('/'+locale.to_s) or !url.include?(locale.to_s+'=')) + url + end + + # Clean the link back + def get_go_back + begin + if request.url.include?('locale=') + session[:last_page] + else + session[:last_page] = remove_locale(request.referer) + end + rescue + "/#{params[:controller]}" + end + end + + def show_avatar(user) + image_tag(user.avatar.thumb.url) + end + + def render_sitemap + items = action_data + def node(items, level) + class_name = nil + case level + when 0 + class_name = "sitemap-list level-1" + when 1 + class_name = "sitemap-list level-2" + when 2 + class_name = "sitemap-list level-3" + end + html = "
      " + items.each do |key,item| + if item["children"] && !item["children"].empty? + url = item["url"] + target = item["target"] + html = html + "
    • #{key}" + html = html + node(item["children"],level + 1) + html = html + "
    • " + else + target = item["target"] + url = item["url"] + html = html + "
    • #{key}
    • " + end + end + html = html + "
    " + html + end + html = node(items,0) + html.html_safe + end + + def show_attribute_value(value) + if value.kind_of? Hash + result = [] + value.each{|t| result.push(t.last)} + result.join "," + else + value + end + end + + def create_pagination(total_pages) + file = File.join(Rails.root, 'app', 'templates', "#{@key}", 'home', "pagination.html.erb") + html = "" + if File.exists?file + file = File.open(file) + doc = Nokogiri::HTML(file, nil, "UTF-8") + file.close + querystring = request.GET rescue {} + querystring.delete("page_no") + paginationobj = doc.css("*[data-pagination='true']").first + in_html = first = last = nextpage = prevpage = paginationobj.inner_html + f_html = "" + current_page_number = OrbitHelper.page_number + if current_page_number > 1 + first = first.gsub("%7B%7Bpagination_link%7D%7D","?page_no=1&#{querystring.to_query}") + first = first.gsub("{{page_number}}",t(:pagination_first)) + first = first.gsub("{{pagination_active}}","") + f_html = f_html + first + end + start_number = current_page_number - 2 + end_number = current_page_number + 2 + if end_number > total_pages + end_number = total_pages + start_number = total_pages - 4 + end + if start_number < 1 + start_number = 1 + end_number = 5 + end + end_number = end_number > total_pages ? total_pages : end_number + (start_number..end_number).each do |i| + h = in_html + h = h.gsub("%7B%7Bpagination_link%7D%7D","?page_no=#{i.to_s}&#{querystring.to_query}") + h = h.gsub("{{page_number}}",i.to_s) + h = h.gsub("{{pagination_active}}",(i == current_page_number ? "active" : "")) + f_html = f_html + h + end + if current_page_number > 1 + prevpage = prevpage.gsub("%7B%7Bpagination_link%7D%7D","?page_no=#{current_page_number - 1}&#{querystring.to_query}") + prevpage = prevpage.gsub("{{page_number}}",(I18n.locale == :zh_tw) ? "上一頁" : "Prevpage") + prevpage = prevpage.gsub("{{pagination_active}}","") + f_html = f_html + prevpage + end + + if current_page_number < total_pages + nextpage = nextpage.gsub("%7B%7Bpagination_link%7D%7D","?page_no=#{current_page_number + 1}&#{querystring.to_query}") + nextpage = nextpage.gsub("{{page_number}}",(I18n.locale == :zh_tw) ? "下一頁" : "Nextpage") + nextpage = nextpage.gsub("{{pagination_active}}","") + f_html = f_html + nextpage + + last = last.gsub("%7B%7Bpagination_link%7D%7D","?page_no=#{total_pages}&#{querystring.to_query}") + last = last.gsub("{{page_number}}",t(:pagination_last)) + last = last.gsub("{{pagination_active}}","") + f_html = f_html + last + end + paginationobj.inner_html = f_html + html = paginationobj.to_s + end + html + end + + def get_target(link) + target = "_blank" + if !link.nil? && link.starts_with?("http") + link = link.split("?").first + temp_url = URI.parse(link) + if temp_url.host.nil? + target = "_self" + end + elsif !link.nil? && !link.starts_with?("http") + target = "_self" + end + target + end + + def write_debug_file(e,controller_name,action_name) + url_dir_name = request.fullpath.split("?")[0] + url_dir_name = URI.decode(url_dir_name) + url_dir_name = (url_dir_name == "/" ? "home" : url_dir_name.sub("/","").gsub("/","_").gsub("-","_").gsub(" ","_")) + directory_name = "tmp/debug/#{url_dir_name}" + FileUtils.mkdir_p(directory_name) unless File.exists?(directory_name) + fn = "#{directory_name}/#{controller_name}_#{action_name}.html" + error_trace_spans = "" + e.backtrace.each do |bt| + error_trace_spans = error_trace_spans + "#{bt}
    " + end + con = "#{controller_name.capitalize}_controller".classify.constantize + File.open(fn, "w"){ |file| + file.puts " + + + + Debug result + + +

    Error Message

    +
    +

    #{e.message}

    +
    +

    Request Details

    +
    + Url : #{URI.decode(request.url)}
    + Controller : #{con.to_s}
    + Action : #{action_name.capitalize} +
    +

    Error Trace

    +
    + #{error_trace_spans} +
    +

    Params

    +
    + #{OrbitHelper.params} +
    + + " + + } + end + +end diff --git a/updatefiles/config.js.erb b/updatefiles/config.js.erb new file mode 100644 index 0000000..3c3edfd --- /dev/null +++ b/updatefiles/config.js.erb @@ -0,0 +1,61 @@ +/** + * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.html or http://ckeditor.com/license + */ + + +CKEDITOR.editorConfig = function( config ) { + config.uiColor = '#e6e6e6'; + config.defaultLanguage = "en"; + if(typeof currentLocaleForCKEDITOR != "undefined"){ + config.language = currentLocaleForCKEDITOR; + }else{ + config.language = '<%= (I18n.locale.to_s == "zh_tw" || I18n.locale.to_s == "zh_cn" ? "zh" : I18n.locale.to_s) %>'; + } + config.height = 400; + config.resize_minHeight = 400; + config.toolbarCanCollapse = true; + config.allowedContent = true; + config.pasteFromWordRemoveFontStyles=false; + config.pasteFromWordRemoveStyles=false; + config.plugins = 'dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,blockquote,clipboard,button,panelbutton,panel,floatpanel,colorbutton,colordialog,templates,menu,contextmenu,resize,toolbar,elementspath,enterkey,entities,popup,filebrowser,find,image,fakeobjects,floatingspace,listblock,richcombo,font,format,horizontalrule,htmlwriter,iframe,wysiwygarea,indent,indentblock,indentlist,justify,menubutton,link,list,liststyle,magicline,maximize,newpage,pastetext,pastefromword,removeformat,selectall,showblocks,showborders,sourcearea,specialchar,scayt,stylescombo,tab,table,tabletools,undo,wsc,youtube,codemirror'; + + config.toolbarGroups = [ + { name: 'document', groups: [ 'mode', 'document', 'doctools' ] }, + { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, + { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] }, + { name: 'links' }, + { name: 'insert' }, + { name: 'forms' }, + { name: 'tools' }, + { name: 'others' }, + { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, + { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align' ] }, + { name: 'styles' }, + { name: 'colors' }, + { name: 'about' } + ]; + + config.skin = 'moono'; + + config.filebrowserBrowseUrl = "<%= Rails.application.routes.url_helpers.admin_assets_path %>"; + config.filebrowserImageBrowseUrl = "<%= Rails.application.routes.url_helpers.admin_assets_path %>"; + + //Font Config + config.font_names = 'Arial;Calibri;Comic Sans MS;Courier New;Georgia;Helvetica;Lucida Sans Unicode;Tahoma;Times New Roman;Trebuchet MS;Verdana;微軟正黑體;標楷體;新細明體'; + + config.fontSize_sizes = '0.5em;0.563em;0.625em;0.688em;0.750em;0.813em;0.875em;0.938em;1em;1.063em;1.125em;1.250em;1.313em;1.375em;1.438em;1.5em;1.75em;2.25em;3em;4.5em;'; + + config.enterMode = CKEDITOR.ENTER_BR; + config.shiftEnterMode = CKEDITOR.ENTER_BR; + config.templates_files = [ '/assets/ckeditor/orbit_templates.js' ]; +}; + +CKEDITOR.on('instanceReady',function(){ + $('.cke_button').tooltip({ + position: { + my: "center bottom-4", + at: "center top" + } + }); +}); diff --git a/updatefiles/member_profile.rb b/updatefiles/member_profile.rb new file mode 100644 index 0000000..2774840 --- /dev/null +++ b/updatefiles/member_profile.rb @@ -0,0 +1,212 @@ +class MemberProfile < ApplicationController + include Mongoid::Document + include Mongoid::Timestamps + include Mongoid::Attributes::Dynamic + include Mongoid::Tree + include Mongoid::Tree::Ordering + + include OrbitModel::Status + include MemberSlug + + field :first_name, type: String, localize: true + field :last_name, type: String, localize: true + field :sex + field :sid + field :office_tel + field :birthday, type: Date + field :address, type: String, localize: true + field :personal_website + field :fax, type: String, localize: true + field :mobile_no, type: String, localize: true + field :autobiography, type: String, localize: true + field :email, type: String + field :position, type: Integer + field :rss2_id + field :public_privacy, type: Array, default: [] + field :logged_in_privacy, type: Array, default: [] + field :locked_privacy, type: Array, default: [] + + VALID_EMAIL_FORMAT = /\A[^@\s]+@([^@.\s]+\.)+[^@.\s]+\z/ + validates :email, uniqueness: true, format: { with: VALID_EMAIL_FORMAT }, if: :email_present? + validates :position, uniqueness: true + + has_one :user + has_and_belongs_to_many :roles + has_and_belongs_to_many :role_statuses + has_and_belongs_to_many :member_tags + + has_many :member_profile_field_values + accepts_nested_attributes_for :member_profile_field_values, allow_destroy: true + + has_many :attribute_values + accepts_nested_attributes_for :attribute_values, allow_destroy: true + + has_many :personal_plugin_intros + + scope :can_display, ->{where(is_hidden: false).order_by([:is_top,:desc],[:created_at,:desc])} + before_save :assign_default_position, :if => :assign_default_position? + + before_destroy :delete_personal_plugin_data + + mount_uploader :avatar, AvatarUploader + # paginates_per 10 + + def get_avatar + avatar = (self.avatar.thumb.url == "thumb_person.png" ? "/assets/thumb_person.png" : self.avatar.thumb.url rescue "/assets/thumb_person.png") + avatar + end + + def name + if self.first_name != "" || self.last_name != "" + I18n.locale.eql?(:zh_tw) ? "#{self.last_name} #{self.first_name}" : "#{self.first_name} #{self.last_name}" + else + @locale = I18n.locale + @site_in_use_locales = current_site.in_use_locales + @name = "" + @site_in_use_locales.each_with_index do |locale,i| + I18n.locale = locale + @name = (I18n.locale.eql?(:zh_tw) ? "#{self.last_name} #{self.first_name}" : "#{self.first_name} #{self.last_name}") + @name = @name.gsub(' ','').strip + break if @name !="" + end + I18n.locale = @locale + return @name + end + end + + def get_privacy_type_for_field(id) + status = nil + if self.public_privacy.include?(id) + status = "public" + elsif self.logged_in_privacy.include?(id) + status = "logged_in" + elsif self.locked_privacy.include?(id) + status = "locked" + else + status = "public" + end + status + end + + def name_translations + { + "en" => "#{self.first_name_translations["en"]} #{self.last_name_translations["zh_tw"]}", + "zh_tw" => "#{self.last_name_translations["zh_tw"]} #{self.first_name_translations["zh_tw"]}" + } + end + + def disable_role=(var) + var[:id].each do |id,val| + if (val=="true") + self.role_ids.reject!{|t| t.to_s == id} + elsif(val=="false") + self.role_ids += Array(id) + end + end + end + + def new_attribute_values=(fields,attribute_type=nil) + fields.each do |key,field| + if attribute_type.eql?("role") + self.attribute_values.build(field) + else + self.member_profile_field_values.build(field) + end + end + end + + def get_attribute_value(attribute_field,attribute_type=nil) + if attribute_type.eql?("role") + AttributeValue.find_by(attribute_field_id: attribute_field.id, member_profile_id: self.id) + else + MemberProfileFieldValue.find_by(member_profile_field_id: attribute_field.id, member_profile_id: self.id) + end + end + + def get_attribute_values(attribute_type=nil) + if attribute_type.eql?("role") + @attribute_values = self.attribute_values rescue nil + else + @attribute_values = self.member_profile_field_values rescue nil + end + end + + def get_value_from_field_id(field_id,attribute_type=nil) + if attribute_type.eql?("role") + values = get_attribute_values(attribute_type) + value = values.detect {|value| value.attribute_field_id == field_id} rescue nil + value ? value : nil + else + values = get_attribute_values + value = values.detect {|value| value.member_profile_field_id == field_id} rescue nil + value ? value : nil + end + end + + def self.get_member_list_attribute_field(field_key, attribute_type=nil) + if attribute_type.eql?("role") + AttributeField.find_by(key: field_key) + else + MemberProfileField.find_by(key: field_key) + end + end + + def self.get_member_list_attribute_value(member_profile_id,field_id,attribute_type=nil) + if attribute_type.eql?("role") + AttributeValue.find_by(member_profile_id: member_profile_id, attribute_field_id: field_id) + else + MemberProfileFieldValue.find_by(member_profile_id: member_profile_id, member_profile_field_id: field_id) + end + end + + def self.get_role_member_data_by_sort(field_key, role_status_id) + a = Array.new + attribute_field_data = get_member_list_attribute_field(field_key,"role") + self.where(role_status_ids: role_status_id).desc(:_id).collect{|t| a << [ get_member_list_attribute_value(t.id,attribute_field_data.id)['val'].to_i, t ] } + member_data = a.sort + member_data_tmp = member_data.collect {|v| v[1] } + end + + def get_attribute_data(field) + if field["key"] == "member_tags" + params = OrbitHelper.params + data = self.send(field["key"]).collect{|tag| "#{tag.title} "}.join("") + else + data = self.send(field["key"]) rescue "" + end + data = (data =~ /\A#{URI::regexp(['http', 'https'])}\z/) ? "#{data}" : data + data = (data =~ /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i) ? "#{data}" : data + field_data = data.blank? ? {"key" => field["key"],"title" => I18n.t("users."+field["key"]), "value" => " "} : {"key" => field["key"],"title" => I18n.t("users."+field["key"]), "value" =>data} + field_data + end + + def get_image_for_show + if self.avatar.present? + image = self.avatar.thumb.url + else + image = "http://placehold.it/100x100" + end + + image_fields = {"img_src" => image} + end + + def delete_personal_plugin_data + OrbitApp::Plugin::Registration.all.each do |plugin| + class_name = plugin.app_name.constantize + plugin_data = class_name.where(member_profile_id: self.id) + plugin_data.delete + end + end + + def assign_default_position? + self.position.nil? || self.parent_id_changed? + end + + def email_present? + self.email.present? + end + + def get_role_statuses(role_id) + RoleStatus.where(role_id: role_id).any_of(member_profile_ids: self.id) + end +end diff --git a/updatefiles/pages_controller.rb b/updatefiles/pages_controller.rb new file mode 100644 index 0000000..d8776db --- /dev/null +++ b/updatefiles/pages_controller.rb @@ -0,0 +1,737 @@ +# pass the layout=false for not rendering the layouts and also can specify the methods to in the backend controller. +# data-layout-content="arrayname" in layouts can be used to render data in the array +require 'zhconv' +require "uri" +class PagesController < ApplicationController + before_action :get_key + layout :get_layout + include PagesHelper + before_filter :check_frontend_open, :only => [:home,:show] + before_filter :check_authorization, :except => [:home,:show] + before_filter :set_edit_mode + prepend_view_path "app/templates" + + def index + @pages = Page.all + # render json: @pages + end + + def edit_view + @manifest = @key + @dataApi = "edit" + view = get_view + if File.exists?(view) + render view + end + end + + def home + @manifest = @key + page = Page.root + Thread.new do + impressionist(page) + end + page.inc(view_count: 1) + params[:is_frontend_view] = "true" + OrbitHelper.set_params params,current_user + OrbitHelper.set_site_locale locale + OrbitHelper.set_request_object request + OrbitHelper.render_meta_tags [] + render :html => render_final_page("home",page,true).html_safe + end + + def show + display_type = "" + path = request.path.split('/') + params[:is_frontend_view] = "true" + if path.size <= 2 + redirect_to root_path + else + if path.last.include? '-' + params[:page_id] = path[-2] + s = CGI.unescape(path[-1]) + s.encode!('UTF-8') + params[:slug] = s + uid = path[-1].split("-").last + uid = uid.split("?").first + if uid.include?(".") + render :file => "#{Rails.root}/app/views/errors/404.html", :layout => false, :status => :not_found + return + end + params[:uid] = uid + params[:target_action] = params[:method] || "show" + display_type = "show" + else + params[:page_id] = path[-1] + params[:slug] = nil + params[:uid] = nil + params[:target_action] = params[:method] || "index" + display_type = "index" + OrbitHelper.set_page_number params[:page_no].to_i || 1 + end + page = Page.find_by_param(params[:page_id]) + if !page.nil? + if !page.user_can_access?(current_user) + render :file => "#{Rails.root}/app/views/errors/403.html", :layout => false, :status => 403 + return + end + if !page.enabled_for_mobile && !$mobile.blank? + render :file => "#{Rails.root}/app/views/errors/404.html", :layout => false, :status => :not_found + return + end + if page.enabled_for.include? I18n.locale.to_s + if page.page_type == "link" + begin + refer_url = URI.parse(page.external_url).to_s + rescue URI::InvalidURIError + refer_url = root_url + end + redirect_to refer_url + return + end + module_app = page.module.downcase.pluralize + params[:target_controller] = "#{module_app}" + if display_type == "index" + params[:layout_type] = params[:method] || page.layout || "index" + end + params[:url] = page.url + categories = [] + if page.module == "member" + if page.categories.first == "all" + categories = ["all"] + else + page.categories.each do |c| + category = Role.find(c) rescue nil + if !category.nil? && !category.disabled + categories << c + end + end + end + else + page.categories.each do |c| + category = Category.find(c) rescue nil + if !category.nil? && !category.disable + categories << c + end + end + categories = ["all"] if categories.blank? + end + @manifest = @key + OrbitHelper.set_params params,current_user + OrbitHelper.set_request_object request + OrbitHelper.set_site_locale locale + OrbitHelper.set_this_module_app module_app.singularize + OrbitHelper.set_page_categories categories || ["all"] + OrbitHelper.set_page_tags page.tags || [] + OrbitHelper.set_page_role_status page.role_status || [] + OrbitHelper.set_member_sort_position page.member_sort_position + OrbitHelper.set_page_data_count page.data_count + if params[:layout].kind_of?(String) + layout = to_bool(params[:layout]) + else + layout = true + end + + Thread.new do + impressionist(page) + end + page.inc(view_count: 1) + render :html => render_final_page("#{module_app}/#{params[:target_action]}",page,layout).html_safe + else + if Site.first.enable_redirect_index + redirect_to root_url + else + render :file => "#{Rails.root}/app/views/errors/411.html", :layout => false, :status => :not_found + end + end + else + render :file => "#{Rails.root}/app/views/errors/404.html", :layout => false, :status => :not_found + end + end + end + + def update_child_pages_url(page) + page.child_page.each do |cp| + if !cp.child_page.blank? + update_child_pages_url(cp) + else + cp.url = page.url + "/#{cp.page_id}" + cp.save + end + end + end + + def update_item_position + @page = Page.find(params[:id]) + new_parent_page = Page.find(params[:parent_id]) + old_parent_page_id = @page.parent_page_id + @page.parent_page_id = new_parent_page.id + if new_parent_page.id != old_parent_page_id + url = (new_parent_page.url == "/" ? "" : new_parent_page.url) + @page.url = url + "/#{@page.page_id}" + if !@page.child_page.blank? + update_child_pages_url(@page) + end + end + @page.save + params["children_ids"].each_with_index do |child,i| + page = Page.find(child) + page.number = i + page.save + end + + if new_parent_page.id != old_parent_page_id + old_parent_page = Page.find(old_parent_page_id) + + # old_parent_page.child_page.each_with_index do |page,i| + # page.number = i + # page.save + # end + params["parent_children_ids"] = params["parent_children_ids"] || [] + params["parent_children_ids"].each_with_index do |child, i| + page = Page.find(child) + page.number = i + page.save + end + end + render :json => {"success"=>true}.to_json + end + + def preview + render render_final_page + end + + def destroy + page = Page.find(params[:id]) + # @parent_pages = page.parent_pages_without_root + @pageid = page.id.to_s + page.destroy + respond_to do |format| + format.js + end + end + + def import_widgets + page = Page.find(params[:id]) rescue nil + page.page_parts.destroy_all + if !page.nil? + page.parent_page.page_parts.each do |pp| + new_pp = pp.clone + new_pp.page_id = page.id + pp.sub_parts.each do |sp| + new_sp = sp.clone + new_pp.sub_parts << new_sp + end + new_pp.save + page.page_parts << new_pp + end + page.save + end + render :json => {"success" => true}.to_json + end + + def get_member_attributes + @page_id = params[:page_id] + @type = params[:type] + @selected_attribs = [] + if @type == "index" + @selected_attribs = Page.find(@page_id).custom_array_field + @selected_attribs = [ + {"key"=>"name", "type"=>"profile","sort_order"=>2,"link_to_show"=>true, "human_readable" => I18n.t("users.name")}, + {"key"=>"email", "type"=>"profile", "human_readable" => I18n.t("users.email")}, + {"key"=>"office_tel", "type"=>"profile", "human_readable" => I18n.t("users.office_tel")} + ] if @selected_attribs.blank? + elsif @type == "show" + @selected_attribs = Page.find(@page_id).custom_array_field_for_show + if @selected_attribs.blank? + @selected_attribs = [ + {"key"=>"name", "type"=>"profile","sort_order"=>2,"link_to_show"=>true, "human_readable" => I18n.t("users.name")}, + {"key"=>"email", "type"=>"profile", "human_readable" => I18n.t("users.email")}, + {"key"=>"office_tel", "type"=>"profile", "human_readable" => I18n.t("users.office_tel")} + ] + infos = MemberInfo.order('created_at DESC') + infos.each do |info| + info.member_profile_fields.each do |member_profile_field| + @selected_attribs << {"id"=> member_profile_field.id.to_s, "key"=> member_profile_field.key, "type"=>"custom"} if !member_profile_field.to_show.blank? + end + end + Role.where(:disabled => false).each do |role| + role.attribute_fields.each do |attribute_field| + @selected_attribs << {"id"=> attribute_field.id.to_s, "key"=> attribute_field.key, "type"=>"role", "role_key" => role.key}# if !attribute_field.to_show.blank? + end + end + end + end + personal_attribs = [ + {"key" => "first_name", "human_readable" => I18n.t("users.first_name")}, + {"key" => "last_name", "human_readable" => I18n.t("users.last_name")}, + {"key" => "name", "human_readable" => I18n.t("users.name")}, + {"key" => "sex", "human_readable" => I18n.t("users.sex")}, + {"key" => "office_tel", "human_readable" => I18n.t("users.office_tel")}, + {"key" => "mobile_no", "human_readable" => I18n.t("users.mobile_no")}, + {"key" => "fax", "human_readable" => I18n.t("users.fax")}, + {"key" => "member_tags", "human_readable" => I18n.t("users.member_tags")}, + {"key" => "birthday", "human_readable" => I18n.t("users.birthday")}, + {"key" => "address", "human_readable" => I18n.t("users.address")}, + {"key" => "personal_website", "human_readable" => I18n.t("users.personal_website")}, + {"key" => "autobiography", "human_readable" => I18n.t("users.autobiography")}, + {"key" => "email", "human_readable" => I18n.t("users.email")} + ] + + custom_attribs = MemberProfileField.all.asc(:created_at).collect do |mpf| + {"key" => mpf.key, "human_readable" => mpf.title, "id" => mpf.id.to_s} + end + + role_attribs = [] + ra = AttributeField.all.asc(:created_at).group_by(&:role) + keys = ra.keys + keys.each do |r| + next if r.nil? + t = {"role" => r.title, "role_key" => r.key, "attributes" => []} + ra[r].each do |af| + t["attributes"] << {"key" => af.key, "human_readable" => af.title, "id" => af.id.to_s} + end + role_attribs << t + end + + @attribs = { + "profile" => personal_attribs, + "custom" => custom_attribs, + "role" => role_attribs, + "types" =>[ + {"key" => "profile", "human_readable" => "Profile"}, + {"key" => "custom", "human_readable" => "Custom"}, + {"key" => "role", "human_readable" => "Role"} + ] + } + render :partial => "member_frontend_field" + end + + def save_member_frontend_fields + fields = params["fields"] + array = [] + fields.each do |field| + array << field.last + end + page = Page.find(params[:page_id]) + if params[:type] == "index" + page.custom_array_field = array + elsif params[:type] == "show" + page.custom_array_field_for_show = array + end + page.save + render :json => {"success" => true}.to_json + end + + def get_categories + module_app = ModuleApp.find_by_key(params[:module]); + if module_app.key.eql?("member") + roles = Role.order_by(:_id=>'ASC').all.collect do |role| + { + "title" => role.title, + "id" => role.id.to_s, + "status" => RoleStatus.where(:role=>role).collect do |status| + { + "title" => status.title, + "id" => status.id.to_s + } + end + } + end + else + if !module_app.key.eql?("page_content") + categories = module_app.categories.enabled.collect do |cat| + { + "title" => cat.title, + "id" => cat.id.to_s + } + end + tags = module_app.tags.collect do |t| + { + "name" => t.name, + "id" => t.id.to_s + } + end + else + categories = [] + tags = [] + end + end + + roles = roles.nil? ? [] : roles + categories = categories.nil? ? [] : categories + tags = tags.nil? ? [] : tags + + if module_app.data_count.nil? + render :json => {"categories" => categories, "tags" => tags,"roles" => roles,"layouts" => (get_layouts module_app.key),"data_count" => {"present"=>false}, "locale" => I18n.locale.to_s}.to_json + else + render :json => {"categories" => categories, "tags" => tags,"roles" => roles,"layouts" => (get_layouts module_app.key),"data_count" => {"present"=>true,"start"=>module_app.data_count.begin, "end" => module_app.data_count.end}, "locale" => I18n.locale.to_s}.to_json + end + end + + def new + @page = Page.new( + :enabled_for_mobile=>true, + :menu_enabled_for=>["en", "zh_tw"], + :enabled_for=>["en", "zh_tw"], + :enabled_for_sitemap=>["en", "zh_tw"] + ) + @pages = Page.where(:page_id.ne => "" , :page_id.exists => true) + @modules = ModuleApp.all.frontend_enabled.order_by(:key=>'asc') + @al = [[t("access_level_none"),"none"], [t("access_level_users"),"users"]] + Role.all.each do |role| + @al << [role.title, role.id] + end + end + + def edit + @page = Page.find(params[:id]) + if params[:type] == "page" + @pages = Page.where(:page_id.ne => "" , :page_id.exists => true) + @modules = ModuleApp.all.frontend_enabled + @module_app = ModuleApp.find_by_key(@page.module) rescue nil + @categories = @module_app.categories.enabled rescue [] + if @module_app.key.eql?("page_content") + @categories = [] + end + @tags = @module_app.tags rescue [] + if @module_app.key.eql?("member") + @roles = Role.order_by(:_id=>'ASC').all.collect do |role| + { + "title" => role.title, + "id" => role.id.to_s, + "status" => RoleStatus.where(:role=>role) + } + end + else + @roles = [] + end + @layout_types = get_layouts @module_app.key + end + @al = [[t("access_level_none"),"none"], [t("access_level_users"),"users"]] + Role.all.each do |role| + @al << [role.title, role.id] + end + end + + def update + @page = Page.find(params[:id]) + @page.update_attributes(page_update_params) + @page.save + # @parent_pages = @page.parent_pages_without_root + respond_to do |format| + format.js + end + + end + + def create + params['page']['page_id'] = params['page']['page_id'].gsub('-','_') + @page = Page.new(page_params) + @page.save! + # @parent_pages = @page.parent_pages_without_root + respond_to do |format| + format.js + end + end + + private + + def get_layouts(module_app) + layout_types = [] + f = File.join("#{Rails.root}/app/templates/#{@key}/modules/#{module_app}/info.json") + if File.exists?f + info = File.read(f) + hash = JSON.parse(info) rescue {} + frontends = hash["frontend"] || [] + frontends.each do |frontend| + frontend["thumbnail"] = "/assets/#{module_app}/thumbs/#{frontend["thumbnail"]}" + layout_types << frontend + end + end + if layout_types.empty? + Dir.glob("#{Rails.root}/app/templates/#{@key}/modules/#{module_app}/*").each do |w| + next if File.ftype(w).eql?("directory") + w = File.basename(w, ".*") + w = File.basename(w, ".*") + if w[0,1] != "_" && w[0,1] != "s" && w != "info" + layout_types << w + end + end + end + layout_types + end + + def render_final_page(original_view=get_view,page,layout) + final_html_for_render = "" + OrbitHelper.set_css_to_render_to_empty + if layout + parts = $mobile.blank? ? (page.page_parts rescue []) : (page.mobile_page_parts rescue []) + + @part_partials = {} + parts.each do |part| + subparts = part.sub_parts.asc(:created_at) + partials = [] + subparts.each do |subpart| + if subpart.kind == "module_widget" + + OrbitHelper.set_current_widget subpart + OrbitHelper.set_widget_data_count subpart.data_count + OrbitHelper.set_widget_module_app subpart.module + OrbitHelper.set_widget_item_url subpart + OrbitHelper.render_meta_tags [] + OrbitHelper.set_widget_title subpart.title + OrbitHelper.set_widget_categories subpart.categories || ["all"] + OrbitHelper.set_widget_tags subpart.tags || ["all"] + custom_value = subpart.custom_string_field || subpart.custom_array_field rescue nil + if !custom_value.nil? + OrbitHelper.set_widget_custom_value custom_value + end + if @editmode + partials << "
    " + render_widget_for_frontend(subpart.module,subpart.widget_method,subpart.widget_type,subpart.id.to_s) + "
    " + else + # widget_html = Rails.cache.fetch("subpart_#{subpart.module}_#{subpart.id.to_s}_"+I18n.locale.to_s,{ race_condition_ttl: 2, expires_in: 5.minutes}) do + # render_widget_for_frontend(subpart.module,subpart.widget_method,subpart.widget_type,subpart.id.to_s) + # end + widget_html = render_widget_for_frontend(subpart.module,subpart.widget_method,subpart.widget_type,subpart.id.to_s) + partials << widget_html + end + elsif subpart.kind == "text" + if @editmode + partials << "
    " + subpart.content + "
    " + else + # change from px to em start + if subpart.content.include? "px" + @arrofindex = Array.new + @indexOfpx = subpart.content.index('px') + @arrofindex.push @indexOfpx + while @indexOfpx.nil? == false + @indexOfpx = subpart.content.index('px',@indexOfpx+1) + break if @indexOfpx.nil? == true + @arrofindex.push @indexOfpx + end + @arrofchangeString = Array.new + @arrofnewString = Array.new + @arrofindex.each do |indexPX| + for i in (0...indexPX).to_a.reverse + next if subpart.content[i] == " " + @isnum = Float(subpart.content[i]) rescue nil + break if @isnum.nil? == true || subpart.content[i] == ":" + end + if i != indexPX - 1 + @arrofchangeString.push subpart.content[(i+1)..(indexPX+1)] + @arrofnewString.push ((subpart.content[(i+1)...(indexPX)].to_i / 16.0).to_s + "em") + end + end + @arrofchangeString.each_with_index do |changeString,i| + subpart.content = subpart.content.sub(changeString,@arrofnewString[i]) + end + end + # change from px to em end + partials << subpart.content + end + end + end + @part_partials["data-pp='#{part.part_id}'"] = partials + end + + @file = nil + @layout_html = nil + if original_view == "home" + @file = File.join("#{@key}", "/home/index.html.erb") + else + @file = File.join("#{@key}", "/home/page.html.erb") + end + @layout_html = render_to_string(@file , :formats => :html) + doc = Nokogiri::HTML(@layout_html, nil, "UTF-8") + head = doc.css("head") + @part_partials.each do |key, partial| + html_string = "" + partial.each do |p| + if !p.nil? + html_string = html_string + p + end + end + pp = doc.css("*[#{key}]") + if !pp.blank? + pp = pp[0] + pp.inner_html = html_string + end + end + + if @editmode + pps = doc.css("*[data-pp]") + pps.each do |pp| + number = pp.attributes["data-pp"].value + if pp.inner_html.strip == "" + pp.inner_html = " " + else + inner_html = pp.inner_html + pp.inner_html = inner_html + " " + end + end + end + + if original_view != "home" + viewarea = doc.css("*[data-content='true']")[0] + viewarea.inner_html = render_to_string(original_view) rescue "
    " + # change from px to em start + if viewarea.inner_html.include? "px" + @arrofindex = Array.new + @indexOfpx = viewarea.inner_html.index('px') + @arrofindex.push @indexOfpx + while @indexOfpx.nil? == false + @indexOfpx = viewarea.inner_html.index('px',@indexOfpx+1) + break if @indexOfpx.nil? == true + @arrofindex.push @indexOfpx + end + @arrofchangeString = Array.new + @arrofnewString = Array.new + @arrofindex.each do |indexPX| + for i in (0...indexPX).to_a.reverse + next if viewarea.inner_html[i] == " " + @isnum = Float(viewarea.inner_html[i]) rescue nil + break if @isnum.nil? == true || viewarea.inner_html[i] == ":" + end + if i != indexPX - 1 + @arrofchangeString.push viewarea.inner_html[(i+1)..(indexPX+1)] + @arrofnewString.push ((viewarea.inner_html[(i+1)...(indexPX)].to_i / 16.0).to_s + "em") + end + end + @arrofchangeString.each_with_index do |changeString,i| + viewarea.inner_html = viewarea.inner_html.sub(changeString,@arrofnewString[i]) + end + end + # change from px to em end + head[0].inner_html = OrbitHelper.meta_tags_html + head.inner_html + end + head[0].inner_html = head.inner_html + OrbitHelper.get_css_to_render_in_head + link = doc.css("link")[0] + link.attributes["href"].value = current_site.favicon.url.nil? ? "/assets/favicon.ico" : current_site.favicon.url + final_html_for_render = doc.to_html + + else + final_html_for_render = render_to_string(original_view) rescue "
    " + end + final_html_for_render = change_to_language(final_html_for_render) + if @editmode + session[:mobile] = $temp_mobile + end + format_date(final_html_for_render,(original_view == "home" ? "home" : page.module)) rescue final_html_for_render + end + + def format_date(html,module_key) + doc = Nokogiri::HTML(html, nil, "UTF-8") + doc.css("body").first.set_attribute("data-module",module_key) rescue nil + dates = doc.css("*[date-format]") + if dates.blank? + return doc.to_html + else + dates.each do |d| + format = d.attributes["date-format"].value + date = DateTime.parse(d.inner_text) + d.inner_html = d.inner_html.gsub(d.inner_text.strip, " " + date.strftime(format)) + end + return doc.to_html + end + end + + def get_widget_path(widget) + file = File.join('../templates', "#{@key}", "modules/#{widget}") + end + + def get_view + page = Page.find(params[:id]) rescue Page.root + if page == Page.root + @view = File.join(Rails.root, 'app', 'templates', "#{@key}", "home/index.html.erb") + else + module_name = page.module.downcase.singularize + @view = File.join(Rails.root, 'app', 'templates', "#{@key}", "modules/#{module_name}/index.html.erb") + end + end + + def page_params + page = Page.find(params[:page][:parent_page]) + page.url = page.url == "/" ? "" : page.url + @url = page.url + "/#{params[:page][:page_id]}" + valid_locales = current_site.valid_locales rescue [] + p = params.require(:page).permit(:number, :page_type, :page_id, :module, :access_level, :layout, :parent_page, :data_count, :enabled_for_mobile, :member_sort_position, enabled_for_sitemap: [], enabled_for: [], menu_enabled_for: [], categories: [], tags: [], role_status: [], name_translations: valid_locales ,external_url_translations: valid_locales) + p["url"] = @url + if p["external_url_translations"] + current_site.in_use_locales.each do |loc| + p["external_url_translations"][loc.to_s] = p["external_url_translations"][loc.to_s].sub("http://" + request.host_with_port,"") if p["external_url_translations"][loc.to_s].present? + end + end + p + end + + def page_update_params + valid_locales = current_site.valid_locales rescue [] + p = params.require(:page).permit(:number, :page_type, :page_id, :module, :access_level, :layout, :parent_page, :data_count, :custom_string_field, :enabled_for_mobile, :member_sort_position, enabled_for_sitemap: [], enabled_for: [],menu_enabled_for: [], categories: [], tags: [], role_status: [], name_translations: valid_locales, external_url_translations: valid_locales) + p["role_status"] = p["role_status"] || [] + p["categories"] = p["categories"] || [] + p["tags"] = p["tags"] || [] + p["enabled_for"] = p["enabled_for"] || [] + p["menu_enabled_for"] = p["menu_enabled_for"] || [] + p["enabled_for_sitemap"] = p["enabled_for_sitemap"] || [] + p["enabled_for_mobile"] = p["enabled_for_mobile"] || 0 + if p["external_url_translations"] + current_site.in_use_locales.each do |loc| + p["external_url_translations"][loc.to_s] = p["external_url_translations"][loc.to_s].sub("http://" + request.host_with_port,"") if p["external_url_translations"][loc.to_s].present? + end + end + p + end + + def get_layout + if request[:action] == "edit_view" + page = Page.find(params[:id]) + if page.page_id == "" || page.page_id == nil + false + else + File.join("../../templates", "#{@key}", "/home/page.html.erb") + end + # elsif request[:action] == "show" || request[:action] == "moduleShow" + # File.join("../../templates", "themes", "#{@key}", '/home/page.html.erb') + else + false + end + end + def to_bool(str) + return true if str == "true" + return false if str == "false" + end + + def check_frontend_open + if !current_site.frontend_open && current_user.blank? + redirect_to '/admin/dashboards' + end + end + + def check_authorization + if current_user.blank? or !current_user.is_admin? + redirect_to '/admin/dashboards' + end + end + + def set_edit_mode + @dataApi = "frontend" + @editmode = false + if !current_user.nil? and current_user.is_admin? + if params[:editmode] == "on" + @editmode = true + @dataApi = "edit" + end + end + end + + def change_to_language(final_html) + if session[:zh_cn] + final_html = ZhConv.convert("zh-cn", final_html,false) + final_html.gsub!('/zh_tw/','/zh_cn/') + final_html.sub!('繁体中文','繁体中文') + end + final_html + end + +end diff --git a/updatefiles/site.rb b/updatefiles/site.rb new file mode 100644 index 0000000..514315e --- /dev/null +++ b/updatefiles/site.rb @@ -0,0 +1,74 @@ +class Site + include Mongoid::Document + include Mongoid::Timestamps + include Slug + + DEBUG = false + + field :title, as: :slug_title, type: String, localize: true + field :school, type: String + field :department, type: String + field :address, type: String + field :footer, localize: true + field :social_share, type: String + field :sub_menu, localize: true + field :site_type + field :site_map_link, type: String, :default => "/sitemap" + field :terms_of_use_link, type: String + field :google_analytics, type: String + field :in_use_locales, :type => Array + field :valid_locales, :type => Array + field :site_active, :type => Boolean + field :frontend_open, :type => Boolean, :default => true + field :backend_openness_on, :type => Boolean, :default => false + field :mobile_api_openness_on, :type => Boolean, :default => false + field :desktop_closed, :type => Boolean, :default => false + field :enable_language_detection, :type => Boolean, :default => false + field :enable_redirect_index, :type => Boolean, :default => true + field :enable_zh_cn, :type => Boolean, :default => true + field :enable_language_options, :type => Boolean, :default => true + field :default_locale, :default => "zh_tw" + field :mobile_on, :type => Boolean, :default => false + field :announcement_category, :type => Array, :default=>[] + field :mobile_bar_color, :type => Array, :default=>[] + field :phone_number, :type => Array,:default=>[] + field :title_always_on, :type => Boolean, :default => false + field :display_title_in_frontend, :type => Boolean, :default => true + field :sitemap_menu_in_header, :type => Boolean, :default => false + field :enable_terms_of_use, :type => Boolean, :default => false + field :search,:type => Hash + field :site_settings + field :template, type: String + field :store_token + field :enable_last_update, type: Boolean, :default => false + field :personal_plugins_sort, type: Array, :default => [] + field :sign_up_roles, type: Array, :default => [] + + field :mobile_orbit_bar_title, localize: true + field :google_oauth_enabled, :type => Boolean, :default => false + field :google_client_id + field :google_client_secret + field :meta_tags + field :every_page_sharer, type: Array, :default => ["facebook","twitter","google","printer"] + + field :sync_enabled, type: Boolean, :default => false + field :sync_rake_task + + field :month_traffic_cache + field :home_link, :type => String, :default=>"/" + field :home_link_1, :type => String, :default=>"/" + field :site_title, :type => Hash, :default=>{:zh_tw=>"主頁",:en=>"home_page"} + field :site_title_1, :type => Hash, :default=>{:zh_tw=>"主頁",:en=>"home_page"} + mount_uploader :default_image, ImageUploader + mount_uploader :site_logo, ImageUploader + mount_uploader :site_logo_1, ImageUploader + mount_uploader :favicon, ImageUploader + mount_uploader :mobile_icon, ImageUploader + + def register_site(url,university,department,email,country) + api_key = STORE_CONFIG[:store_settings]["api_key"] + self.generate_site_token + store = Store.new(self.id.to_s,self.site_token,api_key) + store.post_client(self.id.to_s,self.site_token,self.title,url,university,department,email,country) + end +end