rails_kindeditor 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +115 -16
- data/app/controllers/kindeditor/assets_controller.rb +119 -42
- data/app/uploaders/kindeditor/asset_uploader.rb +68 -0
- data/app/uploaders/kindeditor/file_uploader.rb +3 -58
- data/app/uploaders/kindeditor/flash_uploader.rb +14 -0
- data/app/uploaders/kindeditor/image_uploader.rb +3 -58
- data/app/uploaders/kindeditor/media_uploader.rb +14 -0
- data/lib/generators/rails_kindeditor/install/install_generator.rb +1 -2
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/kindeditor-init.js +9 -8
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/kindeditor-min.js +158 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/lang/en.js +208 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/lang/zh_CN.js +210 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/lang/zh_TW.js +210 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/clearhtml/clearhtml.js +28 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/code/code.js +57 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/code/prettify.css +13 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/code/prettify.js +28 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/emoticons.js +129 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{0.gif → images/0.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{1.gif → images/1.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{10.gif → images/10.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{100.gif → images/100.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{101.gif → images/101.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{102.gif → images/102.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{103.gif → images/103.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{104.gif → images/104.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{105.gif → images/105.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{106.gif → images/106.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{107.gif → images/107.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{108.gif → images/108.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{109.gif → images/109.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{11.gif → images/11.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{110.gif → images/110.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{111.gif → images/111.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{112.gif → images/112.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{113.gif → images/113.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{114.gif → images/114.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{115.gif → images/115.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{116.gif → images/116.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{117.gif → images/117.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{118.gif → images/118.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{119.gif → images/119.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{12.gif → images/12.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{120.gif → images/120.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{121.gif → images/121.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{122.gif → images/122.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{123.gif → images/123.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{124.gif → images/124.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{125.gif → images/125.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{126.gif → images/126.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{127.gif → images/127.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{128.gif → images/128.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{129.gif → images/129.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{13.gif → images/13.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{130.gif → images/130.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{131.gif → images/131.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{132.gif → images/132.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{133.gif → images/133.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{134.gif → images/134.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{14.gif → images/14.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{15.gif → images/15.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{16.gif → images/16.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{17.gif → images/17.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{18.gif → images/18.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{19.gif → images/19.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{2.gif → images/2.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{20.gif → images/20.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{21.gif → images/21.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{22.gif → images/22.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{23.gif → images/23.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{24.gif → images/24.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{25.gif → images/25.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{26.gif → images/26.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{27.gif → images/27.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{28.gif → images/28.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{29.gif → images/29.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{3.gif → images/3.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{30.gif → images/30.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{31.gif → images/31.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{32.gif → images/32.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{33.gif → images/33.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{34.gif → images/34.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{35.gif → images/35.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{36.gif → images/36.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{37.gif → images/37.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{38.gif → images/38.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{39.gif → images/39.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{4.gif → images/4.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{40.gif → images/40.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{41.gif → images/41.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{42.gif → images/42.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{43.gif → images/43.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{44.gif → images/44.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{45.gif → images/45.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{46.gif → images/46.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{47.gif → images/47.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{48.gif → images/48.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{49.gif → images/49.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{5.gif → images/5.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{50.gif → images/50.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{51.gif → images/51.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{52.gif → images/52.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{53.gif → images/53.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{54.gif → images/54.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{55.gif → images/55.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{56.gif → images/56.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{57.gif → images/57.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{58.gif → images/58.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{59.gif → images/59.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{6.gif → images/6.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{60.gif → images/60.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{61.gif → images/61.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{62.gif → images/62.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{63.gif → images/63.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{64.gif → images/64.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{65.gif → images/65.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{66.gif → images/66.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{67.gif → images/67.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{68.gif → images/68.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{69.gif → images/69.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{7.gif → images/7.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{70.gif → images/70.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{71.gif → images/71.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{72.gif → images/72.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{73.gif → images/73.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{74.gif → images/74.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{75.gif → images/75.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{76.gif → images/76.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{77.gif → images/77.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{78.gif → images/78.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{79.gif → images/79.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{8.gif → images/8.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{80.gif → images/80.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{81.gif → images/81.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{82.gif → images/82.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{83.gif → images/83.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{84.gif → images/84.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{85.gif → images/85.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{86.gif → images/86.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{87.gif → images/87.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{88.gif → images/88.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{89.gif → images/89.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{9.gif → images/9.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{90.gif → images/90.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{91.gif → images/91.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{92.gif → images/92.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{93.gif → images/93.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{94.gif → images/94.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{95.gif → images/95.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{96.gif → images/96.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{97.gif → images/97.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{98.gif → images/98.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{99.gif → images/99.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{qq.gif → images/static.gif} +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/filemanager/filemanager.js +189 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/{file_manager → filemanager}/images/file-16.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/{file_manager → filemanager}/images/file-64.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/{file_manager → filemanager}/images/folder-16.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/{file_manager → filemanager}/images/folder-64.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/{file_manager → filemanager}/images/go-up.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/flash/flash.js +128 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/image.js +226 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/insertfile/insertfile.js +104 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/lineheight/lineheight.js +38 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/link/link.js +59 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/map/map.html +57 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/map/map.js +135 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/media/media.js +136 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/pagebreak/pagebreak.js +26 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/plainpaste/plainpaste.js +41 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/preview/preview.js +31 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/quickformat/quickformat.js +71 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/table/table.js +661 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/template/html/1.html +14 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/template/html/2.html +42 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/template/html/3.html +36 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/template/template.js +58 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/wordpaste/wordpaste.js +57 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes}/common/blank.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes}/common/flash.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes}/common/loading.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes}/common/media.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes}/common/rm.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes}/default/bg.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes/default}/default.css +427 -396
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/themes/default/default.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/themes/simple/simple.css +148 -0
- data/lib/generators/rails_kindeditor/migration/migration_generator.rb +16 -3
- data/{app/models → lib/generators/rails_kindeditor/migration/templates/models/active_record}/kindeditor/asset.rb +2 -5
- data/{app/models → lib/generators/rails_kindeditor/migration/templates/models/active_record}/kindeditor/file.rb +1 -2
- data/lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/flash.rb +3 -0
- data/{app/models → lib/generators/rails_kindeditor/migration/templates/models/active_record}/kindeditor/image.rb +1 -2
- data/lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/media.rb +3 -0
- data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/asset.rb +20 -0
- data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/file.rb +3 -0
- data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/flash.rb +3 -0
- data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/image.rb +3 -0
- data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/media.rb +3 -0
- data/lib/rails_kindeditor/helper.rb +14 -2
- data/lib/rails_kindeditor/version.rb +1 -1
- data/rails_kindeditor.gemspec +3 -3
- metadata +199 -182
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/kindeditor.js +0 -4688
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/about.html +0 -52
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/accessory.html +0 -74
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/advtable/advtable.html +0 -235
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/advtable/cell.html +0 -201
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/file_manager.css +0 -64
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/file_manager.html +0 -31
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/file_manager.js +0 -221
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/flash.html +0 -69
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/image.html +0 -305
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/link/link.html +0 -82
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/media.html +0 -73
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/plainpaste.html +0 -44
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/wordpaste.html +0 -50
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/doc.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/editor.css +0 -47
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/mp3.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/pdf.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/rar.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/xls.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/default/default.gif +0 -0
@@ -1,221 +0,0 @@
|
|
1
|
-
var JSON_URL = '/kindeditor/filemanager';
|
2
|
-
|
3
|
-
var KE = parent.KindEditor;
|
4
|
-
var id = KE.util.getParam(location.href, 'id');
|
5
|
-
var fileManagerJson = (typeof KE.g[id].fileManagerJson == 'undefined') ? JSON_URL : KE.g[id].fileManagerJson;
|
6
|
-
var lang = KE.lang.plugins.file_manager;
|
7
|
-
KE.event.ready(function() {
|
8
|
-
var moveupImg = KE.$('moveupImg', document);
|
9
|
-
var moveupLink = KE.$('moveup', document);
|
10
|
-
var viewType = KE.$('viewType', document);
|
11
|
-
var orderType = KE.$('orderType', document);
|
12
|
-
var listTable = KE.$('listTable', document);
|
13
|
-
var viewTable = KE.$('viewTable', document);
|
14
|
-
var listDiv = KE.$('listDiv', document);
|
15
|
-
var viewDiv = KE.$('viewDiv', document);
|
16
|
-
moveupImg.alt = moveupImg.title = lang.moveup;
|
17
|
-
viewType.options[0] = new Option(lang.viewImage, 'VIEW');
|
18
|
-
viewType.options[1] = new Option(lang.listImage, 'LIST');
|
19
|
-
orderType.options[0] = new Option(lang.fileName, 'NAME');
|
20
|
-
orderType.options[1] = new Option(lang.fileSize, 'SIZE');
|
21
|
-
orderType.options[2] = new Option(lang.fileType, 'TYPE');
|
22
|
-
var changeType = function(type) {
|
23
|
-
if (type == 'VIEW') {
|
24
|
-
listDiv.style.display = 'none';
|
25
|
-
viewDiv.style.display = '';
|
26
|
-
} else {
|
27
|
-
listDiv.style.display = '';
|
28
|
-
viewDiv.style.display = 'none';
|
29
|
-
}
|
30
|
-
};
|
31
|
-
var insertLink = function(url) {
|
32
|
-
var stack = KE.g[id].dialogStack;
|
33
|
-
if (stack.length > 1) {
|
34
|
-
var parentDialog = stack[stack.length - 2];
|
35
|
-
var dialogDoc = KE.util.getIframeDoc(parentDialog.iframe);
|
36
|
-
KE.$('url', dialogDoc).value = url;
|
37
|
-
var currentDialog = stack[stack.length - 1];
|
38
|
-
currentDialog.hide();
|
39
|
-
return true;
|
40
|
-
} else {
|
41
|
-
return false;
|
42
|
-
}
|
43
|
-
}
|
44
|
-
var insertImage = function(url, title) {
|
45
|
-
if (!insertLink(url)) {
|
46
|
-
KE.util.insertHtml(id, '<img src="' + url + '" alt="' + title + '" />');
|
47
|
-
}
|
48
|
-
};
|
49
|
-
var insertFile = function(url, title) {
|
50
|
-
if (!insertLink(url)) {
|
51
|
-
KE.util.insertHtml(id, '<a href="' + url + '" target="_blank">' + title + '</a>');
|
52
|
-
}
|
53
|
-
};
|
54
|
-
var makeFileTitle = function (filename, filesize, datetime) {
|
55
|
-
var title = filename + ' (' + Math.ceil(filesize / 1024) + 'KB, ' + datetime + ')';
|
56
|
-
return title;
|
57
|
-
};
|
58
|
-
var bindTitle = function (el, data) {
|
59
|
-
if (data.is_dir) {
|
60
|
-
el.title = data.filename;
|
61
|
-
} else {
|
62
|
-
el.title = makeFileTitle(data.filename, data.filesize, data.datetime);
|
63
|
-
}
|
64
|
-
};
|
65
|
-
var bindEvent = function (el, result, data, createFunc) {
|
66
|
-
var fileUrl = result.current_url + data.filename;
|
67
|
-
fileUrl = KE.format.getUrl(fileUrl, 'absolute');
|
68
|
-
if (data.is_dir) {
|
69
|
-
el.onclick = (function (url, path, title) {
|
70
|
-
return function () {
|
71
|
-
reloadPage(path, orderType.value, createFunc);
|
72
|
-
}
|
73
|
-
})(data.filename, escape(result.current_dir_path + data.filename + '/'), data.filename);
|
74
|
-
} else if (data.is_photo) {
|
75
|
-
el.onclick = (function (url, title) {
|
76
|
-
return function () {
|
77
|
-
insertImage(url, title);
|
78
|
-
}
|
79
|
-
})(data.filename, data.filename);
|
80
|
-
} else {
|
81
|
-
el.onclick = (function (url, title) {
|
82
|
-
return function () {
|
83
|
-
insertFile(url, title);
|
84
|
-
}
|
85
|
-
})(data.filename, data.filename);
|
86
|
-
}
|
87
|
-
};
|
88
|
-
var createCommon = function(result, createFunc) {
|
89
|
-
if (result.current_dir_path) {
|
90
|
-
moveupLink.onclick = function () {
|
91
|
-
reloadPage(result.moveup_dir_path, orderType.value, createFunc);
|
92
|
-
};
|
93
|
-
} else {
|
94
|
-
moveupLink.onclick = null;
|
95
|
-
}
|
96
|
-
var onchangeFunc = function() {
|
97
|
-
changeType(viewType.value);
|
98
|
-
if (viewType.value == 'VIEW') reloadPage(result.current_dir_path, orderType.value, createView);
|
99
|
-
else reloadPage(result.current_dir_path, orderType.value, createList);
|
100
|
-
};
|
101
|
-
viewType.onchange = onchangeFunc;
|
102
|
-
orderType.onchange = onchangeFunc;
|
103
|
-
};
|
104
|
-
var createList = function(responseText) {
|
105
|
-
listDiv.innerHTML = '';
|
106
|
-
var result = KE.util.parseJson(responseText);
|
107
|
-
createCommon(result, createList);
|
108
|
-
var table = KE.$$('table', document);
|
109
|
-
table.className = 'file-list-table';
|
110
|
-
table.cellPadding = 0;
|
111
|
-
table.cellSpacing = 2;
|
112
|
-
table.border = 0;
|
113
|
-
listDiv.appendChild(table);
|
114
|
-
var fileList = result.file_list;
|
115
|
-
for (var i = 0, len = fileList.length; i < len; i++) {
|
116
|
-
var data = fileList[i];
|
117
|
-
var row = table.insertRow(i);
|
118
|
-
row.onmouseover = function () { this.className = 'selected'; };
|
119
|
-
row.onmouseout = function () { this.className = 'noselected'; };
|
120
|
-
var cell0 = row.insertCell(0);
|
121
|
-
cell0.className = 'name';
|
122
|
-
var iconName = data.is_dir ? 'folder-16.gif' : 'file-16.gif';
|
123
|
-
var img = KE.$$('img', document);
|
124
|
-
img.src = './images/' + iconName;
|
125
|
-
img.width = 16;
|
126
|
-
img.height = 16;
|
127
|
-
img.align = 'absmiddle';
|
128
|
-
img.alt = data.filename;
|
129
|
-
cell0.appendChild(img);
|
130
|
-
cell0.appendChild(document.createTextNode(' ' + data.filename));
|
131
|
-
if (!data.is_dir || data.has_file) {
|
132
|
-
row.style.cursor = 'pointer';
|
133
|
-
img.title = data.filename;
|
134
|
-
cell0.title = data.filename;
|
135
|
-
bindEvent(cell0, result, data, createList);
|
136
|
-
} else {
|
137
|
-
img.title = lang.emptyFolder;
|
138
|
-
cell0.title = lang.emptyFolder;
|
139
|
-
}
|
140
|
-
var cell1 = row.insertCell(1);
|
141
|
-
cell1.className = 'size';
|
142
|
-
cell1.innerHTML = data.is_dir ? '-' : Math.ceil(data.filesize / 1024) + 'KB';
|
143
|
-
var cell2 = row.insertCell(2);
|
144
|
-
cell2.className = 'datetime';
|
145
|
-
cell2.innerHTML = data.datetime;
|
146
|
-
}
|
147
|
-
};
|
148
|
-
var createView = function(responseText) {
|
149
|
-
viewDiv.innerHTML = '';
|
150
|
-
var result = KE.util.parseJson(responseText);
|
151
|
-
createCommon(result, createView);
|
152
|
-
var fileList = result.file_list;
|
153
|
-
for (var i = 0, len = fileList.length; i < len; i++) {
|
154
|
-
var data = fileList[i];
|
155
|
-
var div = KE.$$('div', document);
|
156
|
-
div.className = 'file-view-area';
|
157
|
-
viewDiv.appendChild(div);
|
158
|
-
var tableObj = KE.util.createTable(document);
|
159
|
-
var table = tableObj.table;
|
160
|
-
table.className = 'photo noselected';
|
161
|
-
table.onmouseover = function () { this.className = 'photo selected'; };
|
162
|
-
table.onmouseout = function () { this.className = 'photo noselected'; };
|
163
|
-
var cell = tableObj.cell;
|
164
|
-
cell.valign = 'middle';
|
165
|
-
cell.align = 'center';
|
166
|
-
//var fileUrl = result.current_url + data.filename;
|
167
|
-
var fileUrl = data.filename;
|
168
|
-
//var iconUrl = data.is_dir ? './images/folder-64.gif' : (data.is_photo ? fileUrl : './images/file-64.gif');
|
169
|
-
var iconUrl = fileUrl;
|
170
|
-
var img = KE.$$('img', document);
|
171
|
-
img.src = data.filename;
|
172
|
-
img.width = data.is_dir ? 64 : 80;
|
173
|
-
img.height = data.is_dir ? 64 : 80;
|
174
|
-
img.alt = data.filename;
|
175
|
-
if (!data.is_dir || data.has_file) {
|
176
|
-
table.style.cursor = 'pointer';
|
177
|
-
bindTitle(img, data);
|
178
|
-
bindTitle(table, data);
|
179
|
-
bindEvent(table, result, data, createView);
|
180
|
-
} else {
|
181
|
-
img.title = lang.emptyFolder;
|
182
|
-
table.title = lang.emptyFolder;
|
183
|
-
}
|
184
|
-
cell.appendChild(img);
|
185
|
-
div.appendChild(table);
|
186
|
-
//var titleDiv = KE.$$('div', document);
|
187
|
-
//titleDiv.className = 'name';
|
188
|
-
//titleDiv.title = data.filename;
|
189
|
-
//titleDiv.innerHTML = data.filename;
|
190
|
-
//div.appendChild(titleDiv);
|
191
|
-
}
|
192
|
-
};
|
193
|
-
var httpRequest = function (param, func) {
|
194
|
-
KE.util.showLoadingPage(id);
|
195
|
-
var req = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
|
196
|
-
var url = fileManagerJson;
|
197
|
-
if (!url.match(/\?/)) {
|
198
|
-
url += '?';
|
199
|
-
param = param.substr(1);
|
200
|
-
}
|
201
|
-
url += param + '&' + (new Date()).getTime();
|
202
|
-
req.open('GET', url, true);
|
203
|
-
req.onreadystatechange = function () {
|
204
|
-
if (req.readyState == 4) {
|
205
|
-
if(req.status == 200) {
|
206
|
-
func(req.responseText);
|
207
|
-
KE.util.pluginLang('file_manager', document);
|
208
|
-
KE.util.hideLoadingPage(id);
|
209
|
-
}
|
210
|
-
}
|
211
|
-
};
|
212
|
-
req.send(null);
|
213
|
-
};
|
214
|
-
var reloadPage = function (path, order, func) {
|
215
|
-
httpRequest('&path=' + path + '&order=' + order, func);
|
216
|
-
};
|
217
|
-
changeType('VIEW');
|
218
|
-
viewType.value = 'VIEW';
|
219
|
-
reloadPage('', orderType.value, createView);
|
220
|
-
}, window, document);
|
221
|
-
|
@@ -1,69 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8" />
|
5
|
-
<title>Flash</title>
|
6
|
-
<link href="../skins/default.css" rel="stylesheet" />
|
7
|
-
<style type="text/css" rel="stylesheet">
|
8
|
-
body {
|
9
|
-
margin: 0;
|
10
|
-
font:12px/1.5 "sans serif",tahoma,verdana,helvetica;
|
11
|
-
background-color:#F0F0EE;
|
12
|
-
color:#222222;
|
13
|
-
overflow:hidden;
|
14
|
-
}
|
15
|
-
label {
|
16
|
-
cursor:pointer;
|
17
|
-
}
|
18
|
-
.main {
|
19
|
-
margin: 0 10px;
|
20
|
-
}
|
21
|
-
.table {
|
22
|
-
list-style-image:none;
|
23
|
-
list-style-position:outside;
|
24
|
-
list-style-type:none;
|
25
|
-
margin:0;
|
26
|
-
padding:0;
|
27
|
-
display:block;
|
28
|
-
}
|
29
|
-
.table li {
|
30
|
-
padding:0;
|
31
|
-
margin-bottom:10px;
|
32
|
-
display:list-item;
|
33
|
-
line-height:1.5;
|
34
|
-
}
|
35
|
-
.table li label {
|
36
|
-
font-weight:bold;
|
37
|
-
}
|
38
|
-
</style>
|
39
|
-
<script type="text/javascript">
|
40
|
-
var KE = parent.KindEditor;
|
41
|
-
var id = KE.util.getParam(location.href, 'id');
|
42
|
-
KE.event.ready(function() {
|
43
|
-
var urlBox = KE.$('url', document);
|
44
|
-
KE.util.pluginLang('flash', document);
|
45
|
-
KE.util.hideLoadingPage(id);
|
46
|
-
urlBox.focus();
|
47
|
-
urlBox.select();
|
48
|
-
}, window, document);
|
49
|
-
</script>
|
50
|
-
</head>
|
51
|
-
<body>
|
52
|
-
<div class="main">
|
53
|
-
<ul class="table">
|
54
|
-
<li>
|
55
|
-
<label for="url" class="ke-inline-block"><span id="lang.url"></span></label>
|
56
|
-
<input type="text" id="url" name="url" value="http://" maxlength="255" class="ke-inline-block ke-text-input" style="width:90%;" />
|
57
|
-
</li>
|
58
|
-
<li>
|
59
|
-
<label for="width" class="ke-inline-block"><span id="lang.width"></span></label>
|
60
|
-
<input type="text" id="width" name="width" value="550" maxlength="4" class="ke-inline-block ke-text-input" style="width:50px;text-align:right;" /> px
|
61
|
-
</li>
|
62
|
-
<li>
|
63
|
-
<label for="height" class="ke-inline-block"><span id="lang.height"></span></label>
|
64
|
-
<input type="text" id="height" name="height" value="400" maxlength="4" class="ke-inline-block ke-text-input" style="width:50px;text-align:right;" /> px
|
65
|
-
</li>
|
66
|
-
</ul>
|
67
|
-
</div>
|
68
|
-
</body>
|
69
|
-
</html>
|
@@ -1,305 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8" />
|
5
|
-
<title>Image</title>
|
6
|
-
<link href="../../skins/default.css" rel="stylesheet" />
|
7
|
-
<style type="text/css" rel="stylesheet">
|
8
|
-
body {
|
9
|
-
margin: 0;
|
10
|
-
font:12px/1.5 "sans serif",tahoma,verdana,helvetica;
|
11
|
-
background-color:#F0F0EE;
|
12
|
-
color:#222222;
|
13
|
-
overflow:hidden;
|
14
|
-
}
|
15
|
-
form {
|
16
|
-
margin:0;
|
17
|
-
}
|
18
|
-
label {
|
19
|
-
cursor:pointer;
|
20
|
-
}
|
21
|
-
#resetBtn {
|
22
|
-
margin-left:10px;
|
23
|
-
cursor:pointer;
|
24
|
-
}
|
25
|
-
.main {
|
26
|
-
padding: 0 10px;
|
27
|
-
}
|
28
|
-
.clearfix:after {
|
29
|
-
content: ".";
|
30
|
-
display: block;
|
31
|
-
height: 0;
|
32
|
-
clear: both;
|
33
|
-
visibility: hidden;
|
34
|
-
}
|
35
|
-
.tab-navi {
|
36
|
-
width:98%;
|
37
|
-
border-bottom:1px solid #A0A0A0;
|
38
|
-
padding-left:5px;
|
39
|
-
margin-bottom:10px;
|
40
|
-
|
41
|
-
}
|
42
|
-
.tab-navi ul {
|
43
|
-
list-style-image:none;
|
44
|
-
list-style-position:outside;
|
45
|
-
list-style-type:none;
|
46
|
-
margin:0;
|
47
|
-
padding:0;
|
48
|
-
}
|
49
|
-
.tab-navi li {
|
50
|
-
position: relative;
|
51
|
-
border: 1px solid #A0A0A0;
|
52
|
-
background-color: #E0E0E0;
|
53
|
-
margin: 0 2px -1px 0;
|
54
|
-
padding: 0 20px;
|
55
|
-
float: left;
|
56
|
-
line-height: 25px;
|
57
|
-
text-align: center;
|
58
|
-
color: #555555;
|
59
|
-
cursor: pointer;
|
60
|
-
}
|
61
|
-
.tab-navi li.selected {
|
62
|
-
background-color: #F0F0EE;
|
63
|
-
border-bottom: 1px solid #F0F0EE;
|
64
|
-
color: #000000;
|
65
|
-
cursor: default;
|
66
|
-
}
|
67
|
-
.tab-navi li.on {
|
68
|
-
background-color: #F0F0EE;
|
69
|
-
color: #000000;
|
70
|
-
}
|
71
|
-
.table {
|
72
|
-
list-style-image:none;
|
73
|
-
list-style-position:outside;
|
74
|
-
list-style-type:none;
|
75
|
-
margin:0;
|
76
|
-
padding:0;
|
77
|
-
display:block;
|
78
|
-
}
|
79
|
-
.table li {
|
80
|
-
padding:0;
|
81
|
-
margin:0;
|
82
|
-
margin-bottom:10px;
|
83
|
-
display:list-item;
|
84
|
-
}
|
85
|
-
.table li label {
|
86
|
-
font-weight:bold;
|
87
|
-
}
|
88
|
-
.upload {
|
89
|
-
position: relative;
|
90
|
-
overflow: hidden;
|
91
|
-
}
|
92
|
-
input.url {
|
93
|
-
width: 200px;
|
94
|
-
}
|
95
|
-
#imgFile {
|
96
|
-
position: absolute;
|
97
|
-
top: 0;
|
98
|
-
right: 0;
|
99
|
-
width: 70px;
|
100
|
-
height: 25px;
|
101
|
-
z-index: 811212;
|
102
|
-
border: 0 none;
|
103
|
-
opacity:0;
|
104
|
-
filter:alpha(opacity=0);
|
105
|
-
}
|
106
|
-
</style>
|
107
|
-
<script type="text/javascript">
|
108
|
-
var KE = parent.KindEditor;
|
109
|
-
var id = KE.util.getParam(location.href, 'id');
|
110
|
-
var fileManager = null;
|
111
|
-
var allowUpload = (typeof KE.g[id].allowUpload == 'undefined') ? true : KE.g[id].allowUpload;
|
112
|
-
var allowFileManager = (typeof KE.g[id].allowFileManager == 'undefined') ? false : KE.g[id].allowFileManager;
|
113
|
-
var referMethod = (typeof KE.g[id].referMethod == 'undefined') ? '' : KE.g[id].referMethod;
|
114
|
-
var imageUploadJson = (typeof KE.g[id].imageUploadJson == 'undefined') ? '../../php/upload_json.php' : KE.g[id].imageUploadJson;
|
115
|
-
var imageTabDefault = 0;
|
116
|
-
var lang = KE.lang.plugins.image;
|
117
|
-
KE.event.ready(function() {
|
118
|
-
var typeBox = KE.$('type', document);
|
119
|
-
var urlBox = KE.$('url', document);
|
120
|
-
var localUrlBox = KE.$('localUrl', document);
|
121
|
-
var viewServerBox = KE.$('viewServer', document);
|
122
|
-
var viewLocalBox = KE.$('viewLocal', document);
|
123
|
-
var alignElements = document.getElementsByName('align');
|
124
|
-
var fileBox = KE.$('imgFile', document);
|
125
|
-
var widthBox = KE.$('imgWidth', document);
|
126
|
-
var heightBox = KE.$('imgHeight', document);
|
127
|
-
var titleBox = KE.$('imgTitle', document);
|
128
|
-
var resetBtn = KE.$('resetBtn', document);
|
129
|
-
var tabNavi = KE.$('tabNavi', document);
|
130
|
-
var defaultImg = KE.$('defaultImg', document);
|
131
|
-
var leftImg = KE.$('leftImg', document);
|
132
|
-
var rightImg = KE.$('rightImg', document);
|
133
|
-
var liList = tabNavi.getElementsByTagName('li');
|
134
|
-
var selectTab = function(num) {
|
135
|
-
if (num == 1) resetBtn.style.display = 'none';
|
136
|
-
else resetBtn.style.display = '';
|
137
|
-
widthBox.value = '';
|
138
|
-
heightBox.value = '';
|
139
|
-
titleBox.value = '';
|
140
|
-
alignElements[0].checked = true;
|
141
|
-
for (var i = 0, len = liList.length; i < len; i++) {
|
142
|
-
var li = liList[i];
|
143
|
-
if (i === num) {
|
144
|
-
li.className = 'selected';
|
145
|
-
li.onclick = null;
|
146
|
-
if (KE.browser.IE) {
|
147
|
-
KE.util.focus(id);
|
148
|
-
KE.util.select(id);
|
149
|
-
}
|
150
|
-
} else {
|
151
|
-
if (allowUpload) {
|
152
|
-
li.className = '';
|
153
|
-
li.onmouseover = function() { KE.addClass(this, 'on'); };
|
154
|
-
li.onmouseout = function() { KE.removeClass(this, 'on'); };
|
155
|
-
li.onclick = (function (i) {
|
156
|
-
return function() {
|
157
|
-
if (!fileManager) selectTab(i);
|
158
|
-
};
|
159
|
-
})(i);
|
160
|
-
} else {
|
161
|
-
li.parentNode.removeChild(li);
|
162
|
-
}
|
163
|
-
}
|
164
|
-
KE.$('tab' + (i + 1), document).style.display = 'none';
|
165
|
-
}
|
166
|
-
typeBox.value = num + 1;
|
167
|
-
KE.$('tab' + (num + 1), document).style.display = '';
|
168
|
-
}
|
169
|
-
selectTab(imageTabDefault);
|
170
|
-
var imgNode = KE.plugin['image'].getSelectedNode(id);
|
171
|
-
if (imgNode) {
|
172
|
-
var tempDiv = KE.$$('div', KE.g[id].iframeDoc);
|
173
|
-
tempDiv.appendChild(imgNode.cloneNode(false));
|
174
|
-
var imgHtml = tempDiv.innerHTML;
|
175
|
-
var src = imgNode.src;
|
176
|
-
if (imgHtml.match(/kesrc="([^"]+)"/i)) src = RegExp.$1;
|
177
|
-
urlBox.value = src;
|
178
|
-
widthBox.value = imgNode.width;
|
179
|
-
heightBox.value = imgNode.height;
|
180
|
-
titleBox.value = (typeof imgNode.alt != 'undefined') ? imgNode.alt : imgNode.title;
|
181
|
-
for (var i = 0, len = alignElements.length; i < len; i++) {
|
182
|
-
if (alignElements[i].value == imgNode.align) {
|
183
|
-
alignElements[i].checked = true;
|
184
|
-
break;
|
185
|
-
}
|
186
|
-
}
|
187
|
-
}
|
188
|
-
if (allowFileManager) {
|
189
|
-
KE.event.add(viewServerBox, 'click', function () {
|
190
|
-
if (fileManager) return false;
|
191
|
-
fileManager = new KE.dialog({
|
192
|
-
id : id,
|
193
|
-
cmd : 'file_manager',
|
194
|
-
file : 'file_manager/file_manager.html',
|
195
|
-
width : 500,
|
196
|
-
height : 400,
|
197
|
-
loadingMode : true,
|
198
|
-
title : KE.lang.fileManager,
|
199
|
-
noButton : KE.lang.no,
|
200
|
-
afterHide : function() {
|
201
|
-
fileManager = null;
|
202
|
-
}
|
203
|
-
});
|
204
|
-
fileManager.show();
|
205
|
-
});
|
206
|
-
} else {
|
207
|
-
viewServerBox.style.display = 'none';
|
208
|
-
urlBox.style.width = '300px';
|
209
|
-
}
|
210
|
-
KE.event.add(fileBox, 'change', function() {
|
211
|
-
localUrlBox.value = fileBox.value;
|
212
|
-
});
|
213
|
-
KE.$('uploadForm', document).action = imageUploadJson;
|
214
|
-
KE.$('referMethod', document).value = referMethod;
|
215
|
-
var alignIds = ['default', 'left', 'right'];
|
216
|
-
for (var i = 0, len = alignIds.length; i < len; i++) {
|
217
|
-
KE.event.add(KE.$(alignIds[i] + 'Img', document), 'click', (function(i) {
|
218
|
-
return function() {
|
219
|
-
KE.$(alignIds[i] + 'Chk', document).checked = true;
|
220
|
-
};
|
221
|
-
})(i));
|
222
|
-
}
|
223
|
-
KE.event.add(resetBtn, 'click', function() {
|
224
|
-
var g = KE.g[id];
|
225
|
-
var img = KE.$$('img', g.iframeDoc);
|
226
|
-
img.src = urlBox.value;
|
227
|
-
img.style.position = 'absolute';
|
228
|
-
img.style.visibility = 'hidden';
|
229
|
-
img.style.top = '0px';
|
230
|
-
img.style.left = '1000px';
|
231
|
-
g.iframeDoc.body.appendChild(img);
|
232
|
-
widthBox.value = img.width;
|
233
|
-
heightBox.value = img.height;
|
234
|
-
g.iframeDoc.body.removeChild(img);
|
235
|
-
});
|
236
|
-
KE.util.pluginLang('image', document);
|
237
|
-
resetBtn.alt = resetBtn.title = lang.resetSize;
|
238
|
-
defaultImg.alt = defaultImg.title = lang.defaultAlign;
|
239
|
-
leftImg.alt = leftImg.title = lang.leftAlign;
|
240
|
-
rightImg.alt = rightImg.title = lang.rightAlign;
|
241
|
-
viewServerBox.value = lang.viewServer;
|
242
|
-
viewLocalBox.value = lang.viewServer;
|
243
|
-
KE.util.hideLoadingPage(id);
|
244
|
-
if (imageTabDefault == 0) {
|
245
|
-
urlBox.focus();
|
246
|
-
urlBox.select();
|
247
|
-
}
|
248
|
-
}, window, document);
|
249
|
-
</script>
|
250
|
-
</head>
|
251
|
-
<body>
|
252
|
-
<div class="main">
|
253
|
-
<div id="tabNavi" class="tab-navi">
|
254
|
-
<ul class="clearfix">
|
255
|
-
<li><span id="lang.remoteImage"></span></li>
|
256
|
-
<li><span id="lang.localImage"></span></li>
|
257
|
-
</ul>
|
258
|
-
</div>
|
259
|
-
<iframe name="uploadIframe" id="uploadIframe" style="display:none;"></iframe>
|
260
|
-
<input type="hidden" id="type" name="type" value="" />
|
261
|
-
<form id="uploadForm" name="uploadForm" method="post" enctype="multipart/form-data" target="uploadIframe">
|
262
|
-
<input type="hidden" id="editorId" name="id" value="" />
|
263
|
-
<input type="hidden" id="referMethod" name="referMethod" value="" />
|
264
|
-
<input type="hidden" name="imgBorder" value="0" />
|
265
|
-
<ul class="table">
|
266
|
-
<li style="height:30px;">
|
267
|
-
<div id="tab1" style="display:none;">
|
268
|
-
<label for="url" class="ke-inline-block"><span id="lang.remoteUrl"></span></label>
|
269
|
-
<input type="text" id="url" name="url" value="http://" maxlength="255" class="ke-inline-block ke-text-input url" />
|
270
|
-
<span class="ke-button-common ke-button-outer btn">
|
271
|
-
<input type="button" class="ke-button-common ke-button" id="viewServer" value="" />
|
272
|
-
</span>
|
273
|
-
</div>
|
274
|
-
<div id="tab2" style="display:none;">
|
275
|
-
<label for="imgFile" class="ke-inline-block"><span id="lang.localUrl"></span></label>
|
276
|
-
<span class="ke-inline-block upload">
|
277
|
-
<input type="text" id="localUrl" length="255" class="ke-inline-block ke-text-input url" tabindex="-1" readonly="true" />
|
278
|
-
<span class="ke-button-common ke-button-outer btn">
|
279
|
-
<input type="button" class="ke-button-common ke-button" id="viewLocal" value="" tabindex="-1" />
|
280
|
-
</span>
|
281
|
-
<input type="file" id="imgFile" name="imgFile" />
|
282
|
-
</span>
|
283
|
-
</div>
|
284
|
-
</li>
|
285
|
-
<li>
|
286
|
-
<label for="imgWidth" class="ke-inline-block"><span id="lang.size"></span></label>
|
287
|
-
<span id="lang.width"></span> <input type="text" id="imgWidth" name="imgWidth" value="" maxlength="4" class="ke-inline-block ke-text-input" style="width:50px;text-align:right;" />
|
288
|
-
<span id="lang.height"></span> <input type="text" id="imgHeight" name="imgHeight" value="" maxlength="4" class="ke-inline-block ke-text-input" style="width:50px;text-align:right;" />
|
289
|
-
<img class="ke-inline-block" src="./images/refresh.gif" width="16" height="16" id="resetBtn" alt="" />
|
290
|
-
</li>
|
291
|
-
<li>
|
292
|
-
<label class="ke-inline-block"><span id="lang.align"></span></label>
|
293
|
-
<input class="ke-inline-block" type="radio" id="defaultChk" name="align" value="" checked="checked" /> <img class="ke-inline-block" id="defaultImg" src="./images/align_top.gif" width="23" height="25" border="0" alt="" />
|
294
|
-
<input class="ke-inline-block" type="radio" id="leftChk" name="align" value="left" /> <img class="ke-inline-block" id="leftImg" src="./images/align_left.gif" width="23" height="25" border="0" alt="" />
|
295
|
-
<input class="ke-inline-block" type="radio" id="rightChk" name="align" value="right" /> <img class="ke-inline-block" id="rightImg" src="./images/align_right.gif" width="23" height="25" border="0" alt="" />
|
296
|
-
</li>
|
297
|
-
<li>
|
298
|
-
<label for="imgTitle" class="ke-inline-block"><span id="lang.imgTitle"></span></label>
|
299
|
-
<input type="text" id="imgTitle" name="imgTitle" value="" maxlength="255" class="ke-inline-block ke-text-input" style="width:95%;" />
|
300
|
-
</li>
|
301
|
-
</ul>
|
302
|
-
</form>
|
303
|
-
</div>
|
304
|
-
</body>
|
305
|
-
</html>
|
@@ -1,82 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8" />
|
5
|
-
<title>Link</title>
|
6
|
-
<link href="../../skins/default.css" rel="stylesheet" />
|
7
|
-
<style type="text/css" rel="stylesheet">
|
8
|
-
body {
|
9
|
-
margin: 0;
|
10
|
-
font:12px/1.5 "sans serif",tahoma,verdana,helvetica;
|
11
|
-
background-color:#F0F0EE;
|
12
|
-
color:#333;
|
13
|
-
overflow:hidden;
|
14
|
-
}
|
15
|
-
label {
|
16
|
-
cursor:pointer;
|
17
|
-
}
|
18
|
-
.main {
|
19
|
-
margin: 0 10px;
|
20
|
-
}
|
21
|
-
.table {
|
22
|
-
list-style-image:none;
|
23
|
-
list-style-position:outside;
|
24
|
-
list-style-type:none;
|
25
|
-
margin:0;
|
26
|
-
padding:0;
|
27
|
-
display:block;
|
28
|
-
}
|
29
|
-
.table li {
|
30
|
-
padding:0;
|
31
|
-
margin-bottom:10px;
|
32
|
-
display:list-item;
|
33
|
-
line-height:1.5;
|
34
|
-
}
|
35
|
-
.table li label {
|
36
|
-
font-weight:bold;
|
37
|
-
}
|
38
|
-
</style>
|
39
|
-
<script type="text/javascript">
|
40
|
-
var KE = parent.KindEditor;
|
41
|
-
var id = KE.util.getParam(location.href, 'id');
|
42
|
-
KE.event.ready(function() {
|
43
|
-
var hyperLink = KE.$('hyperLink', document);
|
44
|
-
var linkType = KE.$('linkType', document);
|
45
|
-
linkType.options[0] = new Option(KE.lang.plugins.link.newWindow, '_blank');
|
46
|
-
linkType.options[1] = new Option(KE.lang.plugins.link.selfWindow, '');
|
47
|
-
var linkNode = KE.plugin['link'].getSelectedNode(id);
|
48
|
-
if (linkNode) {
|
49
|
-
var tempDiv = KE.$$('div', KE.g[id].iframeDoc);
|
50
|
-
tempDiv.appendChild(linkNode.cloneNode(false));
|
51
|
-
var linkHtml = tempDiv.innerHTML;
|
52
|
-
var src = linkNode.href;
|
53
|
-
if (linkHtml.match(/kesrc="([^"]+)"/i)) src = RegExp.$1;
|
54
|
-
var target = linkNode.target;
|
55
|
-
hyperLink.value = KE.util.unescape(src);
|
56
|
-
linkType.value = target == '_blank' ? target : '';
|
57
|
-
var range = KE.g[id].keRange;
|
58
|
-
range.selectTextNode(linkNode);
|
59
|
-
KE.g[id].keSel.addRange(range);
|
60
|
-
}
|
61
|
-
KE.util.pluginLang('link', document);
|
62
|
-
KE.util.hideLoadingPage(id);
|
63
|
-
hyperLink.focus();
|
64
|
-
hyperLink.select();
|
65
|
-
}, window, document);
|
66
|
-
</script>
|
67
|
-
</head>
|
68
|
-
<body>
|
69
|
-
<div class="main">
|
70
|
-
<ul class="table">
|
71
|
-
<li>
|
72
|
-
<label for="hyperLink" class="ke-inline-block"><span id="lang.url"></span></label>
|
73
|
-
<input type="text" id="hyperLink" name="hyperLink" value="http://" class="ke-inline-block ke-text-input" style="width:90%;" />
|
74
|
-
</li>
|
75
|
-
<li>
|
76
|
-
<label for="linkType" class="ke-inline-block"><span id="lang.linkType"></span></label>
|
77
|
-
<select id="linkType" name="linkType" class="ke-inline-block"></select>
|
78
|
-
</li>
|
79
|
-
</ul>
|
80
|
-
</div>
|
81
|
-
</body>
|
82
|
-
</html>
|