gfdnavi 1.3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +10949 -0
- data/LICENCE.txt +57 -0
- data/Makefile +18 -0
- data/TODO +132 -0
- data/app/controllers/analysis_controller.rb +700 -0
- data/app/controllers/application.rb +41 -0
- data/app/controllers/draw_method_controller.rb +172 -0
- data/app/controllers/explorer_controller.rb +197 -0
- data/app/controllers/finder_controller.rb +331 -0
- data/app/controllers/function_controller.rb +204 -0
- data/app/controllers/group_controller.rb +115 -0
- data/app/controllers/keyword_attributes_controller.rb +52 -0
- data/app/controllers/knowledge_controller.rb +928 -0
- data/app/controllers/nodes_controller.rb +515 -0
- data/app/controllers/search_controller.rb +341 -0
- data/app/controllers/user_controller.rb +337 -0
- data/app/helpers/analysis_helper.rb +2 -0
- data/app/helpers/application_helper.rb +105 -0
- data/app/helpers/description_helper.rb +2 -0
- data/app/helpers/function_helper.rb +2 -0
- data/app/helpers/group_helper.rb +2 -0
- data/app/helpers/search_helper.rb +3 -0
- data/app/helpers/user_helper.rb +2 -0
- data/app/helpers/work_flow_helper.rb +92 -0
- data/app/models/actual_file.rb +3 -0
- data/app/models/analysis.rb +715 -0
- data/app/models/analysis_history.rb +42 -0
- data/app/models/cross_array.rb +22 -0
- data/app/models/cross_result.rb +254 -0
- data/app/models/derived_spatial_attribute.rb +3 -0
- data/app/models/diagram_cache.rb +16 -0
- data/app/models/diagram_cache_datum.rb +4 -0
- data/app/models/diagram_cache_session.rb +8 -0
- data/app/models/directory.rb +21 -0
- data/app/models/draw_method.rb +48 -0
- data/app/models/draw_method_attribute.rb +8 -0
- data/app/models/draw_parameter.rb +12 -0
- data/app/models/explorer_query.rb +354 -0
- data/app/models/explorer_result.rb +312 -0
- data/app/models/function.rb +75 -0
- data/app/models/function_argument.rb +6 -0
- data/app/models/function_output.rb +4 -0
- data/app/models/group.rb +153 -0
- data/app/models/image.rb +20 -0
- data/app/models/keyword_attribute.rb +179 -0
- data/app/models/knowledge.rb +94 -0
- data/app/models/knowledge_backup.rb +32 -0
- data/app/models/knowledge_figure.rb +16 -0
- data/app/models/knowledge_figure_backup.rb +16 -0
- data/app/models/knowledge_parser.rb +392 -0
- data/app/models/node.rb +605 -0
- data/app/models/node_entity_abstract.rb +112 -0
- data/app/models/node_lineage.rb +6 -0
- data/app/models/node_relation.rb +4 -0
- data/app/models/path_node.rb +60 -0
- data/app/models/query.rb +193 -0
- data/app/models/query_history.rb +12 -0
- data/app/models/results.rb +48 -0
- data/app/models/sign_up_user.rb +25 -0
- data/app/models/spatial_and_time_attribute.rb +11 -0
- data/app/models/user.rb +115 -0
- data/app/models/user_mailer.rb +48 -0
- data/app/models/value_type.rb +3 -0
- data/app/models/variable.rb +70 -0
- data/app/models/virtual_node.rb +457 -0
- data/app/views/analysis/__help_analysis_tab.en.html +57 -0
- data/app/views/analysis/__help_draw_share.en.html +12 -0
- data/app/views/analysis/__help_draw_tab.en.html +6 -0
- data/app/views/analysis/_analysis_function_settings.rhtml +61 -0
- data/app/views/analysis/_analysis_settings.rhtml +28 -0
- data/app/views/analysis/_diagram.rhtml +70 -0
- data/app/views/analysis/_dimension_option.rhtml +59 -0
- data/app/views/analysis/_draw_general_settings.rhtml +217 -0
- data/app/views/analysis/_draw_settings.rhtml +73 -0
- data/app/views/analysis/_history.rhtml +19 -0
- data/app/views/analysis/_popular_diagrams.rhtml +42 -0
- data/app/views/analysis/_save_form.rhtml +44 -0
- data/app/views/analysis/_variables.rhtml +66 -0
- data/app/views/analysis/_variables_order.rhtml +56 -0
- data/app/views/analysis/index.rhtml +195 -0
- data/app/views/analysis/preview.rhtml +3 -0
- data/app/views/analysis/save.rhtml +73 -0
- data/app/views/analysis/show_diagram.rhtml +42 -0
- data/app/views/cross/_display_map.rhtml +201 -0
- data/app/views/cross/_result.rhtml +205 -0
- data/app/views/cross/_show_result_tree.rhtml +40 -0
- data/app/views/cross/_show_results.rhtml +80 -0
- data/app/views/cross/_style.rhtml +21 -0
- data/app/views/cross/index.rhtml +271 -0
- data/app/views/draw_method/_edit_form.rhtml +110 -0
- data/app/views/draw_method/create.rhtml +8 -0
- data/app/views/draw_method/details.rhtml +113 -0
- data/app/views/draw_method/edit.rhtml +8 -0
- data/app/views/draw_method/list.rhtml +80 -0
- data/app/views/explorer/_display_map.rhtml +199 -0
- data/app/views/explorer/_show_result_tree.rhtml +40 -0
- data/app/views/explorer/_show_results.rhtml +101 -0
- data/app/views/explorer/_style.rhtml +21 -0
- data/app/views/explorer/index.rhtml +214 -0
- data/app/views/finder/_children.html.erb +84 -0
- data/app/views/finder/_children_details.html.erb +74 -0
- data/app/views/finder/_children_details_tr.html.erb +196 -0
- data/app/views/finder/create_tree.html.erb +15 -0
- data/app/views/finder/flex.html.erb +52 -0
- data/app/views/finder/index.html.erb +47 -0
- data/app/views/finder/show_details.html.erb +3 -0
- data/app/views/finder/show_images.html.erb +3 -0
- data/app/views/function/_edit_form.rhtml +106 -0
- data/app/views/function/create.rhtml +8 -0
- data/app/views/function/details.rhtml +96 -0
- data/app/views/function/edit.rhtml +8 -0
- data/app/views/function/list.rhtml +80 -0
- data/app/views/group/add_member.rhtml +13 -0
- data/app/views/group/change_owner.rhtml +15 -0
- data/app/views/group/create.rhtml +11 -0
- data/app/views/group/delete_member.rhtml +14 -0
- data/app/views/group/list.rhtml +63 -0
- data/app/views/knowledge/_backup.rhtml +135 -0
- data/app/views/knowledge/_category.rhtml +58 -0
- data/app/views/knowledge/_category_list.rhtml +34 -0
- data/app/views/knowledge/_category_table.rhtml +23 -0
- data/app/views/knowledge/_comment.rhtml +64 -0
- data/app/views/knowledge/_comment_input_form.rhtml +19 -0
- data/app/views/knowledge/_comments.rhtml +84 -0
- data/app/views/knowledge/_form.rhtml +139 -0
- data/app/views/knowledge/_group_figure_form.rhtml +187 -0
- data/app/views/knowledge/_layout_figure.rhtml +61 -0
- data/app/views/knowledge/_layout_figures_in_a_row_above_text.rhtml +42 -0
- data/app/views/knowledge/_layout_figures_under_text.rhtml +45 -0
- data/app/views/knowledge/_layout_one_figure_above_text.rhtml +28 -0
- data/app/views/knowledge/_summary.rhtml +21 -0
- data/app/views/knowledge/edit.rhtml +37 -0
- data/app/views/knowledge/list.rhtml +287 -0
- data/app/views/knowledge/new.rhtml +23 -0
- data/app/views/knowledge/new_from_analysis.rhtml +21 -0
- data/app/views/knowledge/show.rhtml +196 -0
- data/app/views/layouts/gfdnavi.rhtml +105 -0
- data/app/views/nodes/_ancestors.html.erb +89 -0
- data/app/views/nodes/_description_methods_table.html.erb +75 -0
- data/app/views/nodes/_mode.html.erb +16 -0
- data/app/views/nodes/description.html.erb +181 -0
- data/app/views/nodes/description_methods.html.erb +1 -0
- data/app/views/nodes/edit.html.erb +73 -0
- data/app/views/nodes/index.html.erb +25 -0
- data/app/views/nodes/show.html.erb +20 -0
- data/app/views/search/_children_details_mapsearch.rhtml +68 -0
- data/app/views/search/_children_details_tr.rhtml +205 -0
- data/app/views/search/_show_grouplist.rhtml +74 -0
- data/app/views/search/_show_results.rhtml +43 -0
- data/app/views/search/_show_results_global.rhtml +36 -0
- data/app/views/search/_show_results_partial.rhtml +39 -0
- data/app/views/search/_show_results_partial_groupbyfile.rhtml +50 -0
- data/app/views/search/_show_variablelist.rhtml +28 -0
- data/app/views/search/mapsearch.rhtml +176 -0
- data/app/views/search/remapsearch.rjs +18 -0
- data/app/views/search/show_details.rhtml +3 -0
- data/app/views/user/add_user.rhtml +30 -0
- data/app/views/user/change_password.rhtml +25 -0
- data/app/views/user/edit.html.erb +50 -0
- data/app/views/user/index.rhtml +162 -0
- data/app/views/user/login.rhtml +41 -0
- data/app/views/user/logout.rhtml +4 -0
- data/app/views/user/signup.rhtml +36 -0
- data/app/views/user/signup_succeeded.rhtml +36 -0
- data/app/views/user_mailer/authorization_inform.rhtml +15 -0
- data/app/views/user_mailer/signup_accepted.rhtml +12 -0
- data/app/views/user_mailer/signup_confirm.rhtml +14 -0
- data/app/views/user_mailer/signup_inform.rhtml +13 -0
- data/app/views/user_mailer/signup_rejected.rhtml +11 -0
- data/app/views/work_flow/_push_wsdls.rhtml +55 -0
- data/app/views/work_flow/index.rhtml +46 -0
- data/config/database.yml.example +35 -0
- data/config/environment.rb +68 -0
- data/config/gfdnavi.yml.example +95 -0
- data/config/load_config.rb +151 -0
- data/config/routes.rb +35 -0
- data/consistency_checker.rb +129 -0
- data/data/gfdnavi_docs/how_to_draw_multiple_images.knlge +68 -0
- data/data/gfdnavi_docs/how_to_knowledge.knlge +138 -0
- data/data/gfdnavi_docs/how_to_write_document_about_Gfdnavi.knlge +30 -0
- data/data/samples/jmadata.SIGEN +8 -0
- data/data/samples/jmadata.yml +6 -0
- data/data/samples/jmadata/MSM-P/2006.nc.yml +2 -0
- data/data/samples/jmadata/MSM-P/2006.yml +17 -0
- data/data/samples/jmadata/MSM-P/2006/0101.nc +0 -0
- data/data/samples/jmadata/MSM-P/2006/0101.nc.yml +13 -0
- data/data/samples/jmadata/MSM-P/2006/0102.nc +0 -0
- data/data/samples/jmadata/MSM-P/2006/0103.nc +0 -0
- data/data/samples/jmadata/MSM-P/2006/0104.nc +0 -0
- data/data/samples/jmadata/MSM-P/2006/0105.nc +0 -0
- data/data/samples/jmadata/MSM-P/2006/010[1-3].nc.yml +2 -0
- data/data/samples/jmadata/MSM-P/2006/skip_data.rb +96 -0
- data/data/samples/jmadata/MSM-P/2006/skip_data.sh +6 -0
- data/data/samples/reanalysis.SIGEN +8 -0
- data/data/samples/reanalysis/era40.SIGEN +8 -0
- data/data/samples/reanalysis/era40.yml +2 -0
- data/data/samples/reanalysis/era40/t.jan.nc +0 -0
- data/data/samples/reanalysis/era40/t.jan.nc.yml +1 -0
- data/data/samples/reanalysis/ncep.SIGEN +9 -0
- data/data/samples/reanalysis/ncep/T.jan.100hPa.png +0 -0
- data/data/samples/reanalysis/ncep/T.jan.100hPa.png.yml +43 -0
- data/data/samples/reanalysis/ncep/T.jan.nc +0 -0
- data/data/samples/reanalysis/ncep/T.jan.zonal_mean.nc +0 -0
- data/data/samples/reanalysis/ncep/T.jan.zonal_mean.nc.yml +8 -0
- data/data/samples/reanalysis/ncep/T.jan_only_root.nc +0 -0
- data/data/samples/reanalysis/ncep/T.jan_only_root.nc.yml +4 -0
- data/data/samples/reanalysis/ncep/UV.jan.nc +0 -0
- data/data/samples/reanalysis/ncep/UV.jan.nc.yml +10 -0
- data/data/samples/reanalysis/ncep/UV.jan.nc.yml.ja +11 -0
- data/data/samples/sonde_operational.yml +5 -0
- data/data/samples/sonde_operational/std_plev.yml +12 -0
- data/data/samples/sonde_operational/std_plev/41256.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/42410.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/43333.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/43346.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/48698.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/61641.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/63741.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/67083.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/72261.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/76805.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/82193.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/91165.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/91610.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/91948.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/94294.spl.nc +0 -0
- data/db/NetCDFparser.rb +406 -0
- data/db/create_derived_spatial_attributes.sql +12 -0
- data/db/draw_methods/line.yml +6 -0
- data/db/draw_methods/scatter.yml +38 -0
- data/db/draw_methods/tone.yml +64 -0
- data/db/draw_methods/vector.yml +19 -0
- data/db/dump_db.rb +43 -0
- data/db/functions/additions.yml +10 -0
- data/db/functions/cut.yml +10 -0
- data/db/functions/division.yml +10 -0
- data/db/functions/mean.yml +28 -0
- data/db/functions/multiplication.yml +10 -0
- data/db/functions/stddev.yml +28 -0
- data/db/functions/subtraction.yml +10 -0
- data/db/migrate/001_initial_scheme.rb +289 -0
- data/db/migrate/002_add_open_id_authentication_tables.rb +20 -0
- data/db/register_directory_tree.rb +760 -0
- data/db/restore_db.rb +60 -0
- data/gfdnavi-install +828 -0
- data/install.rb +828 -0
- data/lib/activerecord_gfdnavi.rb +31 -0
- data/lib/basic_authorization.rb +50 -0
- data/lib/create_activeresources.rb +108 -0
- data/lib/execute_analysis.rb +472 -0
- data/lib/file_gfdnavi.rb +38 -0
- data/lib/gphys_gfdnavi.rb +81 -0
- data/lib/localdir.rb +110 -0
- data/lib/login_system.rb +110 -0
- data/lib/multibytes.rb +20 -0
- data/lib/narray_yaml.rb +58 -0
- data/lib/no_rdb_base.rb +40 -0
- data/lib/opendapdir.rb +171 -0
- data/lib/tar.rb +127 -0
- data/lib/tasks/clean.rake +65 -0
- data/lib/tasks/setup.rake +316 -0
- data/lib/tasks/update.rake +62 -0
- data/lib/vizshot_gfdnavi.rb +224 -0
- data/public/crossdomain.xml +4 -0
- data/public/flex/NodeTreeDescriptor.as +55 -0
- data/public/flex/TreeNode.as +253 -0
- data/public/flex/finder.mxml +304 -0
- data/public/flex/finder.swf +0 -0
- data/public/flex/gfdnavi.mxml +52 -0
- data/public/flex/gfdnavi.swf +0 -0
- data/public/images/Help_S-shots/dir_tree_with_add.jpg +0 -0
- data/public/images/analyze.gif +0 -0
- data/public/images/circle.gif +0 -0
- data/public/images/create_from_analysis_button.png +0 -0
- data/public/images/delete.png +0 -0
- data/public/images/down.png +0 -0
- data/public/images/drawbutton.gif +0 -0
- data/public/images/gfdnavi_home_logo.png +0 -0
- data/public/images/gfdnavi_logo_big.png +0 -0
- data/public/images/gfdnavi_logo_med.png +0 -0
- data/public/images/gfdnavi_logo_mini.png +0 -0
- data/public/images/gfdnavi_logo_nobg_big.png +0 -0
- data/public/images/gfdnavi_logo_nobg_med.png +0 -0
- data/public/images/gfdnavi_logo_nobg_small.png +0 -0
- data/public/images/gfdnavi_logo_small.png +0 -0
- data/public/images/gfdnavi_logo_xsmall.png +0 -0
- data/public/images/hbar.png +0 -0
- data/public/images/helpmark16.png +0 -0
- data/public/images/helpmark18.png +0 -0
- data/public/images/kikyu_g.gif +0 -0
- data/public/images/kikyu_r.gif +0 -0
- data/public/images/map_icon_g.gif +0 -0
- data/public/images/map_icon_r.gif +0 -0
- data/public/images/new_knowledge.png +0 -0
- data/public/images/openid.png +0 -0
- data/public/images/read_in_the_form.png +0 -0
- data/public/images/slider_f.gif +0 -0
- data/public/images/slider_f_red.gif +0 -0
- data/public/images/star1.gif +0 -0
- data/public/images/star2.gif +0 -0
- data/public/images/startanim.gif +0 -0
- data/public/images/stopanim.gif +0 -0
- data/public/images/tree/DL.png +0 -0
- data/public/images/tree/anal_viz.png +0 -0
- data/public/images/tree/analyze_visualize_checked_items.png +0 -0
- data/public/images/tree/binary.png +0 -0
- data/public/images/tree/details.png +0 -0
- data/public/images/tree/download_checked_items.png +0 -0
- data/public/images/tree/folder.png +0 -0
- data/public/images/tree/folder_close.gif +0 -0
- data/public/images/tree/image2.png +0 -0
- data/public/images/tree/knowledge.png +0 -0
- data/public/images/tree/knowledges.png +0 -0
- data/public/images/tree/last.gif +0 -0
- data/public/images/tree/last.png +0 -0
- data/public/images/tree/minus.gif +0 -0
- data/public/images/tree/minus_simple.gif +0 -0
- data/public/images/tree/none.gif +0 -0
- data/public/images/tree/none.png +0 -0
- data/public/images/tree/plus.gif +0 -0
- data/public/images/tree/plus_simple.gif +0 -0
- data/public/images/tree/show.png +0 -0
- data/public/images/tree/show_checked_items.png +0 -0
- data/public/images/tree/t.gif +0 -0
- data/public/images/tree/t.png +0 -0
- data/public/images/tree/tate.gif +0 -0
- data/public/images/tree/tate.png +0 -0
- data/public/images/up.png +0 -0
- data/public/images/vbar.png +0 -0
- data/public/images/white.bmp +0 -0
- data/public/images/x.gif +0 -0
- data/public/index.html +100 -0
- data/public/javascripts/AC_OETags.js +269 -0
- data/public/javascripts/analysis.js +751 -0
- data/public/javascripts/application.js +29 -0
- data/public/javascripts/directory_tree.js +102 -0
- data/public/javascripts/draw_method.js +83 -0
- data/public/javascripts/excanvas.js +704 -0
- data/public/javascripts/function.js +107 -0
- data/public/javascripts/gfdnavi.js +175 -0
- data/public/javascripts/knowledge.js +384 -0
- data/public/javascripts/mapsearch.js +313 -0
- data/public/javascripts/progress.js +42 -0
- data/public/javascripts/resizable_box.js +164 -0
- data/public/javascripts/slider.js +260 -0
- data/public/javascripts/tab.js +17 -0
- data/public/javascripts/work_flow.js +452 -0
- data/public/stylesheets/analysis.css +111 -0
- data/public/stylesheets/description.css +71 -0
- data/public/stylesheets/gfdnavi.css +141 -0
- data/public/stylesheets/knowledge.css +218 -0
- data/public/stylesheets/search.css +184 -0
- data/public/stylesheets/tree.css +45 -0
- data/public/stylesheets/tree_for_ie.css +3 -0
- data/public/stylesheets/work_flow.css +78 -0
- data/script/cleaner +11 -0
- data/script/server_ssl +131 -0
- data/test/fixtures/diagram_cache_data.yml +5 -0
- data/test/fixtures/diagram_cache_sessions.yml +6 -0
- data/test/fixtures/diagram_caches.yml +6 -0
- data/test/fixtures/directories.yml +57 -0
- data/test/fixtures/draw_parameters.yml +6 -0
- data/test/fixtures/function_arguments.yml +15 -0
- data/test/fixtures/function_outputs.yml +15 -0
- data/test/fixtures/functions.yml +29 -0
- data/test/fixtures/group_members.yml +33 -0
- data/test/fixtures/groups.yml +25 -0
- data/test/fixtures/images.yml +12 -0
- data/test/fixtures/keyword_attributes.yml +73 -0
- data/test/fixtures/knowledges.yml +10 -0
- data/test/fixtures/node_relations.yml +11 -0
- data/test/fixtures/nodes.yml +298 -0
- data/test/fixtures/sign_up_users.yml +8 -0
- data/test/fixtures/spatial_and_time_attributes.yml +29 -0
- data/test/fixtures/user_mailer/authorization_inform +11 -0
- data/test/fixtures/user_mailer/signup_accepted +10 -0
- data/test/fixtures/user_mailer/signup_confirm +17 -0
- data/test/fixtures/user_mailer/signup_inform +10 -0
- data/test/fixtures/user_mailer/signup_rejected +9 -0
- data/test/fixtures/users.yml +31 -0
- data/test/fixtures/value_types.yml +10 -0
- data/test/fixtures/variables.yml +17 -0
- data/test/functional/analysis_controller_test.rb +169 -0
- data/test/functional/description_controller_test.rb +18 -0
- data/test/functional/function_controller_test.rb +18 -0
- data/test/functional/group_controller_test.rb +18 -0
- data/test/functional/search_controller_test.rb +83 -0
- data/test/functional/user_controller_test.rb +77 -0
- data/test/functional/webservice_analysis_api_test.rb +12 -0
- data/test/functional/work_flow_controller_test.rb +18 -0
- data/test/test_helper.rb +28 -0
- data/test/unit/diagram_cache_datum_test.rb +10 -0
- data/test/unit/diagram_cache_session_test.rb +10 -0
- data/test/unit/diagram_cache_test.rb +10 -0
- data/test/unit/directory_test.rb +49 -0
- data/test/unit/draw_parameter_test.rb +10 -0
- data/test/unit/function_argument_test.rb +10 -0
- data/test/unit/function_output_test.rb +10 -0
- data/test/unit/function_test.rb +10 -0
- data/test/unit/group_test.rb +48 -0
- data/test/unit/image_test.rb +13 -0
- data/test/unit/keyword_attribute_test.rb +33 -0
- data/test/unit/knowledge_test.rb +13 -0
- data/test/unit/node_relation_test.rb +20 -0
- data/test/unit/node_test.rb +85 -0
- data/test/unit/sign_up_user_test.rb +20 -0
- data/test/unit/spatial_and_time_attribute_test.rb +29 -0
- data/test/unit/user_mailer_test.rb +101 -0
- data/test/unit/user_test.rb +134 -0
- data/test/unit/value_type_test.rb +10 -0
- data/test/unit/variable_test.rb +35 -0
- data/vendor/plugins/acts_as_list/README +23 -0
- data/vendor/plugins/acts_as_list/init.rb +3 -0
- data/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb +256 -0
- data/vendor/plugins/acts_as_list/test/list_test.rb +332 -0
- data/vendor/plugins/acts_as_tree/README +26 -0
- data/vendor/plugins/acts_as_tree/Rakefile +22 -0
- data/vendor/plugins/acts_as_tree/init.rb +1 -0
- data/vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb +96 -0
- data/vendor/plugins/acts_as_tree/test/abstract_unit.rb +0 -0
- data/vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb +219 -0
- data/vendor/plugins/acts_as_tree/test/database.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/schema.rb +0 -0
- data/vendor/plugins/will_paginate/CHANGELOG +92 -0
- data/vendor/plugins/will_paginate/LICENSE +18 -0
- data/vendor/plugins/will_paginate/README.rdoc +131 -0
- data/vendor/plugins/will_paginate/Rakefile +62 -0
- data/vendor/plugins/will_paginate/examples/apple-circle.gif +0 -0
- data/vendor/plugins/will_paginate/examples/index.haml +69 -0
- data/vendor/plugins/will_paginate/examples/index.html +92 -0
- data/vendor/plugins/will_paginate/examples/pagination.css +90 -0
- data/vendor/plugins/will_paginate/examples/pagination.sass +91 -0
- data/vendor/plugins/will_paginate/init.rb +1 -0
- data/vendor/plugins/will_paginate/lib/will_paginate.rb +86 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/array.rb +16 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/collection.rb +145 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb +32 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/finder.rb +247 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope.rb +132 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope_patch.rb +39 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/version.rb +9 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb +373 -0
- data/vendor/plugins/will_paginate/will_paginate.gemspec +21 -0
- metadata +586 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
var numInputs = 1;
|
|
2
|
+
var numArgs = 0;
|
|
3
|
+
|
|
4
|
+
function changeInput() {
|
|
5
|
+
numInputs = $('function_nvars').selectedIndex + 1;
|
|
6
|
+
var ary = new Array(numArgs+numInputs);
|
|
7
|
+
for (i=0; i<numArgs; i++)
|
|
8
|
+
ary[i] = 'arg' + i;
|
|
9
|
+
for (i=0; i<numInputs; i++)
|
|
10
|
+
ary[i+numArgs] = 'gphys' + i;
|
|
11
|
+
Element.update('input_args', ary.join(", "));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
var numArgMax=0;
|
|
15
|
+
function changeArgument() {
|
|
16
|
+
numArgs = $('argument_num').selectedIndex;
|
|
17
|
+
changeInput();
|
|
18
|
+
|
|
19
|
+
for (i=0; i<[numArgs,numArgMax].min(); i++)
|
|
20
|
+
Element.show('argument_'+i);
|
|
21
|
+
for (i=numArgs;i<numArgMax; i++)
|
|
22
|
+
Element.hide('argument_'+i);
|
|
23
|
+
|
|
24
|
+
html = "";
|
|
25
|
+
for (i=numArgMax; i<numArgs; i++) {
|
|
26
|
+
html += "<div id='argument_" + i + "'>\n";
|
|
27
|
+
html += "<h4>argument" + i +"</h4>\n";
|
|
28
|
+
html += "<table>\n";
|
|
29
|
+
html += " <tr>\n";
|
|
30
|
+
html += " <td>\n";
|
|
31
|
+
html += " <label for='argument_" + i + "_description'>description</label>\n";
|
|
32
|
+
html += " </td>\n";
|
|
33
|
+
html += " <td>\n";
|
|
34
|
+
html += " <textarea rows='5' cols='40' name='argument[" + i + "][description]' id='argument_" + i + "_description'></textarea>\n";
|
|
35
|
+
html += " </td>\n";
|
|
36
|
+
html += " </tr>\n";
|
|
37
|
+
html += " <tr>\n";
|
|
38
|
+
html += " <td>\n";
|
|
39
|
+
html += " <label for='argument_" + i + "_value_type'>value type</label>\n";
|
|
40
|
+
html += " </td>\n";
|
|
41
|
+
html += " <td>\n";
|
|
42
|
+
html += " <select id='argument_" + i + "_value_type' name='argument[" + i + "][value_type]'>\n";
|
|
43
|
+
html += " <option selected>int</option>\n";
|
|
44
|
+
html += " <option>float</option>\n";
|
|
45
|
+
html += " <option>string</option>\n";
|
|
46
|
+
html += " </select>\n";
|
|
47
|
+
html += " </td>\n";
|
|
48
|
+
html += " </tr>\n";
|
|
49
|
+
html += " <tr>\n";
|
|
50
|
+
html += " <td>\n";
|
|
51
|
+
html += " <label for='argument_" + i + "_default'>default</label>\n";
|
|
52
|
+
html += " </td>\n";
|
|
53
|
+
html += " <td>\n";
|
|
54
|
+
html += " <input type='text' size='10' name='argument[" + i + "][default]' id='argument_" + i + "_default'/>\n";
|
|
55
|
+
html += " </td>\n";
|
|
56
|
+
html += " </tr>\n";
|
|
57
|
+
html += "</table>\n";
|
|
58
|
+
html += "</div>\n";
|
|
59
|
+
numArgMax = i+1;
|
|
60
|
+
}
|
|
61
|
+
new Insertion.Bottom('arguments_table', html);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
var numOutMax=0;
|
|
65
|
+
function changeOutput() {
|
|
66
|
+
var num = $('output_num').selectedIndex + 1;
|
|
67
|
+
|
|
68
|
+
for (i=0; i<[num,numOutMax].min(); i++)
|
|
69
|
+
Element.show('output_'+i);
|
|
70
|
+
for (i=num; i<numOutMax; i++)
|
|
71
|
+
Element.hide('output_'+i);
|
|
72
|
+
|
|
73
|
+
var html = "";
|
|
74
|
+
for (i=numOutMax; i<num; i++) {
|
|
75
|
+
html += "<div id='output_" + i + "'\n";
|
|
76
|
+
html += "<h4>output" + i +"</h4>\n";
|
|
77
|
+
html += "<table>\n";
|
|
78
|
+
html += " <tr>\n";
|
|
79
|
+
html += " <td>\n";
|
|
80
|
+
html += " <label for='output_" + i + "_name'>name</label>\n";
|
|
81
|
+
html += " </td>\n";
|
|
82
|
+
html += " <td>\n";
|
|
83
|
+
html += " <input type='text' size='10' name='output[" + i + "][name]' id='output_" + i + "_name'/>\n";
|
|
84
|
+
html += " </td>\n";
|
|
85
|
+
html += " </tr>\n";
|
|
86
|
+
html += " <tr>\n";
|
|
87
|
+
html += " <td>\n";
|
|
88
|
+
html += " <label for='output_" + i + "_subscript'>subscript</label>\n";
|
|
89
|
+
html += " </td>\n";
|
|
90
|
+
html += " <td>\n";
|
|
91
|
+
html += " <input type='text' size='10' name='output[" + i + "][subscript]' id='output_" + i + "_subscript'/>\n";
|
|
92
|
+
html += " </td>\n";
|
|
93
|
+
html += " </tr>\n";
|
|
94
|
+
html += " <tr>\n";
|
|
95
|
+
html += " <td>\n";
|
|
96
|
+
html += " <label for='output_" + i + "_description'>description</label>\n";
|
|
97
|
+
html += " </td>\n";
|
|
98
|
+
html += " <td>\n";
|
|
99
|
+
html += " <textarea rows='5' cols='40' name='output[" + i + "][description]' id='output_" + i + "_description'></textarea>\n";
|
|
100
|
+
html += " </td>\n";
|
|
101
|
+
html += " </tr>\n";
|
|
102
|
+
html += "</table>\n";
|
|
103
|
+
html += "</div>\n";
|
|
104
|
+
numOutMax = i+1;
|
|
105
|
+
}
|
|
106
|
+
new Insertion.Bottom('outputs_table', html);
|
|
107
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
var gfdnaviUrlRoot;
|
|
2
|
+
|
|
3
|
+
var PopupMenu = Class.create();
|
|
4
|
+
PopupMenu.prototype = {
|
|
5
|
+
initialize: function(element, html, title) {
|
|
6
|
+
this.html = html;
|
|
7
|
+
this.title = title;
|
|
8
|
+
if (element)
|
|
9
|
+
Event.observe(element, "click", this.openMenu.bindAsEventListener(this));
|
|
10
|
+
},
|
|
11
|
+
openMenu: function(e) {
|
|
12
|
+
var date = new Date();
|
|
13
|
+
date = date.getTime();
|
|
14
|
+
var id = 'popup_menu_'+date;
|
|
15
|
+
var hid = 'popup_header_'+date;
|
|
16
|
+
html = '<div id="'+id+'" class="popup_menu" style="display:none">';
|
|
17
|
+
html += '<table cellspacing="0" cellpadding="0" border="1" bordercolor="black">'
|
|
18
|
+
html += '<tr id="'+hid+'" border="0" style="background-color:#ddeeff;cursor:move;">';
|
|
19
|
+
html += '<td>';
|
|
20
|
+
html += '<div align="left" style="float:left">';
|
|
21
|
+
if (this.title)
|
|
22
|
+
html += this.title;
|
|
23
|
+
html += '</div>';
|
|
24
|
+
html += '<div align="right"><a href="#" onClick="Element.remove($(\''+id+'\'));"><img src="' + gfdnaviUrlRoot + '/images/x.gif" alt="X" class="delete"/></a></div>';
|
|
25
|
+
html += '</td></tr>';
|
|
26
|
+
html += '<tr><td>';
|
|
27
|
+
html += '<div style="padding:5px">' + this.html + '</div>';
|
|
28
|
+
html += '</td></tr>';
|
|
29
|
+
html += '</table>';
|
|
30
|
+
html += '</div>';
|
|
31
|
+
|
|
32
|
+
new Insertion.Bottom(Element.extend(document.body), html);
|
|
33
|
+
var menu = $(id);
|
|
34
|
+
new Draggable(menu,{handle: hid});
|
|
35
|
+
if (e) {
|
|
36
|
+
menu.style.left = Event.pointerX(e)-5 + 'px';
|
|
37
|
+
menu.style.top = Event.pointerY(e)-5 + 'px';
|
|
38
|
+
} else {
|
|
39
|
+
menu.style.left = '10px';
|
|
40
|
+
menu.style.top = '10px';
|
|
41
|
+
}
|
|
42
|
+
Element.show(menu);
|
|
43
|
+
if (e)
|
|
44
|
+
Event.stop(e);
|
|
45
|
+
this.id = id;
|
|
46
|
+
},
|
|
47
|
+
closeMenu: function(e) {
|
|
48
|
+
Element.remove(this.id);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
var BenchMark = Class.create();
|
|
53
|
+
BenchMark.prototype = {
|
|
54
|
+
initialize: function (){},
|
|
55
|
+
start: function() {
|
|
56
|
+
this.start_date = new Date();
|
|
57
|
+
},
|
|
58
|
+
set: function(ary, body) {
|
|
59
|
+
this.ids = ary;
|
|
60
|
+
this.body = body;
|
|
61
|
+
},
|
|
62
|
+
load: function(id) {
|
|
63
|
+
if (this.ids) {
|
|
64
|
+
this.ids = this.ids.without(id);
|
|
65
|
+
if (this.ids.length == 0)
|
|
66
|
+
this.complete();
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
complete: function() {
|
|
70
|
+
if ( this.start_date ) {
|
|
71
|
+
var html = this.body + '<br/><hr/>';
|
|
72
|
+
var now = new Date();
|
|
73
|
+
var msec = now.getTime() - this.start_date.getTime();
|
|
74
|
+
html += parseInt(msec/60000)+':'+parseInt((msec%60000)/1000)+'.'+parseInt(msec%1000);
|
|
75
|
+
var pop = new PopupMenu(null, html, 'Result of Benchmark');
|
|
76
|
+
pop.openMenu();
|
|
77
|
+
this.start_date = null;
|
|
78
|
+
this.ids = null;
|
|
79
|
+
this.body = null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
var benchMark = new BenchMark();
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
var normalBgColor = "transparent";
|
|
87
|
+
var highlightBgColor = "yellow";
|
|
88
|
+
function bgUnhighlight(obj) { obj.style.backgroundColor=normalBgColor; }
|
|
89
|
+
function bgHighlight(obj) { obj.style.backgroundColor=highlightBgColor; }
|
|
90
|
+
|
|
91
|
+
var html_hidden = " <font color='red'><b>(hidden currently)</b></font> ";
|
|
92
|
+
var temp_save_str = "";
|
|
93
|
+
|
|
94
|
+
function helpLinkHilit(id, self) {
|
|
95
|
+
obj = $(id);
|
|
96
|
+
if(obj && testElementVisible(obj)){
|
|
97
|
+
obj.style.backgroundColor=highlightBgColor;
|
|
98
|
+
} else {
|
|
99
|
+
temp_save_str = self.innerHTML
|
|
100
|
+
self.innerHTML = temp_save_str + html_hidden;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function helpLinkUnhilit(id, self) {
|
|
104
|
+
obj = $(id);
|
|
105
|
+
if(obj && testElementVisible(obj)){
|
|
106
|
+
obj.style.backgroundColor=normalBgColor;
|
|
107
|
+
} else {
|
|
108
|
+
self.innerHTML = temp_save_str;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function testElementVisible(obj) {
|
|
113
|
+
elm = obj;
|
|
114
|
+
while (elm) {
|
|
115
|
+
if (elm == document)
|
|
116
|
+
return true;
|
|
117
|
+
if (!Element.visible(elm))
|
|
118
|
+
return false;
|
|
119
|
+
elm = elm.parentNode;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function bgFlash(id){
|
|
124
|
+
new Effect.Highlight(id,
|
|
125
|
+
{startcolor:"#ff0000",endcolor:"#ffffff",restorecolor:"#ffffff"});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
//copy of knowledge.js
|
|
129
|
+
function showCommentListShort () {
|
|
130
|
+
comment_list_short = document.getElementById("comment_list_short")
|
|
131
|
+
comment_list_short_button = document.getElementById("comment_list_short_button")
|
|
132
|
+
comment_list_hide = document.getElementById("comment_list_hide")
|
|
133
|
+
comment_list_hide_button = document.getElementById("comment_list_hide_button")
|
|
134
|
+
comment_list_all = document.getElementById("comment_list_all")
|
|
135
|
+
comment_list_all_button = document.getElementById("comment_list_all_button")
|
|
136
|
+
|
|
137
|
+
comment_list_short.style.display = "block";
|
|
138
|
+
comment_list_short_button.style.borderStyle = "solid";
|
|
139
|
+
comment_list_hide.style.display = "none";
|
|
140
|
+
comment_list_hide_button.style.borderStyle = "none";
|
|
141
|
+
comment_list_all.style.display = "none";
|
|
142
|
+
comment_list_all_button.style.borderStyle = "none";
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function showCommentListHide () {
|
|
146
|
+
comment_list_short = document.getElementById("comment_list_short")
|
|
147
|
+
comment_list_short_button = document.getElementById("comment_list_short_button")
|
|
148
|
+
comment_list_hide = document.getElementById("comment_list_hide")
|
|
149
|
+
comment_list_hide_button = document.getElementById("comment_list_hide_button")
|
|
150
|
+
comment_list_all = document.getElementById("comment_list_all")
|
|
151
|
+
comment_list_all_button = document.getElementById("comment_list_all_button")
|
|
152
|
+
|
|
153
|
+
comment_list_short.style.display = "none";
|
|
154
|
+
comment_list_short_button.style.borderStyle = "none";
|
|
155
|
+
comment_list_hide.style.display = "block";
|
|
156
|
+
comment_list_hide_button.style.borderStyle = "solid";
|
|
157
|
+
comment_list_all.style.display = "none";
|
|
158
|
+
comment_list_all_button.style.borderStyle = "none";
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function showCommentListAll () {
|
|
162
|
+
comment_list_short = document.getElementById("comment_list_short")
|
|
163
|
+
comment_list_short_button = document.getElementById("comment_list_short_button")
|
|
164
|
+
comment_list_hide = document.getElementById("comment_list_hide")
|
|
165
|
+
comment_list_hide_button = document.getElementById("comment_list_hide_button")
|
|
166
|
+
comment_list_all = document.getElementById("comment_list_all")
|
|
167
|
+
comment_list_all_button = document.getElementById("comment_list_all_button")
|
|
168
|
+
|
|
169
|
+
comment_list_short.style.display = "none";
|
|
170
|
+
comment_list_short_button.style.borderStyle = "none";
|
|
171
|
+
comment_list_hide.style.display = "none";
|
|
172
|
+
comment_list_hide_button.style.borderStyle = "none";
|
|
173
|
+
comment_list_all.style.display = "block";
|
|
174
|
+
comment_list_all_button.style.borderStyle = "solid";
|
|
175
|
+
}
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
var num_of_figure;
|
|
2
|
+
function setNumOfFigure(x) {
|
|
3
|
+
num_of_figure = x;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
function swapFigure(figure_number) {
|
|
7
|
+
var temp;
|
|
8
|
+
|
|
9
|
+
//knowledge_figure
|
|
10
|
+
temp = document.getElementById("knowledge_figure_"+ figure_number +"_figure_caption").value;
|
|
11
|
+
document.getElementById("knowledge_figure_"+ figure_number +"_figure_caption").value = document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_figure_caption").value;
|
|
12
|
+
document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_figure_caption").value = temp;
|
|
13
|
+
|
|
14
|
+
//file_name and figure_path and label and png
|
|
15
|
+
split1 = document.getElementById("knowledge_figure_"+ figure_number +"_input").name.split("]");
|
|
16
|
+
split2 = document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_input").name.split("]");
|
|
17
|
+
document.getElementById("knowledge_figure_"+ figure_number +"_input").name = split1[0] + "]" + split2[1] + "]";
|
|
18
|
+
document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_input").name = split2[0] + "]" + split1[1] + "]";
|
|
19
|
+
|
|
20
|
+
temp = document.getElementById("knowledge_figure_"+ figure_number +"_input").value;
|
|
21
|
+
document.getElementById("knowledge_figure_"+ figure_number +"_input").value = document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_input").value;
|
|
22
|
+
document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_input").value = temp;
|
|
23
|
+
|
|
24
|
+
temp = document.getElementById("knowledge_figure_"+ figure_number +"_input").type;
|
|
25
|
+
document.getElementById("knowledge_figure_"+ figure_number +"_input").type = document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_input").type;
|
|
26
|
+
document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_input").type = temp;
|
|
27
|
+
|
|
28
|
+
temp = document.getElementById("label_"+ figure_number).firstChild.nodeValue;
|
|
29
|
+
document.getElementById("label_"+ figure_number).firstChild.nodeValue = document.getElementById("label_"+ (figure_number + 1)).firstChild.nodeValue;
|
|
30
|
+
document.getElementById("label_"+ (figure_number+1)).firstChild.nodeValue = temp;
|
|
31
|
+
|
|
32
|
+
temp = document.getElementById("png_"+ figure_number).firstChild.nodeValue;
|
|
33
|
+
document.getElementById("png_"+ figure_number).firstChild.nodeValue = document.getElementById("png_"+ (figure_number + 1)).firstChild.nodeValue;
|
|
34
|
+
document.getElementById("png_"+ (figure_number+1)).firstChild.nodeValue = temp;
|
|
35
|
+
|
|
36
|
+
temp = document.getElementById("knowledge_figure_"+ figure_number +"_figure_path").value;
|
|
37
|
+
temp2 = document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_figure_path").value;
|
|
38
|
+
document.getElementById("knowledge_figure_"+ figure_number +"_figure_path").value = document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_figure_path").value;
|
|
39
|
+
document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_figure_path").value = temp;
|
|
40
|
+
|
|
41
|
+
//diagram_id
|
|
42
|
+
temp = document.getElementById("knowledge_figure_"+ figure_number +"_diagram_id").value;
|
|
43
|
+
document.getElementById("knowledge_figure_"+ figure_number +"_diagram_id").value = document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_diagram_id").value;
|
|
44
|
+
document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_diagram_id").value = temp;
|
|
45
|
+
|
|
46
|
+
//diagram_number (diagram_cache�p)
|
|
47
|
+
temp = document.getElementById("knowledge_figure_"+ figure_number +"_diagram_number").value;
|
|
48
|
+
document.getElementById("knowledge_figure_"+ figure_number +"_diagram_number").value = document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_diagram_number").value;
|
|
49
|
+
document.getElementById("knowledge_figure_"+ (figure_number + 1) +"_diagram_number").value = temp;
|
|
50
|
+
|
|
51
|
+
//image
|
|
52
|
+
temp = document.getElementById("img_"+ figure_number).src;
|
|
53
|
+
document.getElementById("img_"+ figure_number).src = document.getElementById("img_"+ (figure_number + 1)).src;
|
|
54
|
+
document.getElementById("img_"+ (figure_number + 1)).src = temp;
|
|
55
|
+
|
|
56
|
+
//link to image
|
|
57
|
+
temp = document.getElementById("link_to_img_"+ figure_number).href;
|
|
58
|
+
document.getElementById("link_to_img_"+ figure_number).href = document.getElementById("link_to_img_"+ (figure_number + 1)).href;
|
|
59
|
+
document.getElementById("link_to_img_"+ (figure_number + 1)).href = temp;
|
|
60
|
+
|
|
61
|
+
temp = document.getElementById("link_to_img_"+ figure_number).firstChild.nodeValue;
|
|
62
|
+
document.getElementById("link_to_img_"+ figure_number).firstChild.nodeValue = document.getElementById("link_to_img_"+ (figure_number + 1)).firstChild.nodeValue;
|
|
63
|
+
document.getElementById("link_to_img_"+ (figure_number + 1)).firstChild.nodeValue = temp;
|
|
64
|
+
|
|
65
|
+
//view image ...
|
|
66
|
+
temp = document.getElementById("view_image_"+ figure_number).firstChild.nodeValue;
|
|
67
|
+
document.getElementById("view_image_"+ figure_number).firstChild.nodeValue = document.getElementById("view_image_"+ (figure_number + 1)).firstChild.nodeValue;
|
|
68
|
+
document.getElementById("view_image_"+ (figure_number+1)).firstChild.nodeValue = temp;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function deleteFigure(figure_number) {
|
|
72
|
+
if (window.confirm("Are you sure?")){
|
|
73
|
+
for (var i = figure_number; i < num_of_figure; i++) {
|
|
74
|
+
document.getElementById("knowledge_figure_"+ i +"_figure_caption").value = document.getElementById("knowledge_figure_"+ (i+1) +"_figure_caption").value;
|
|
75
|
+
document.getElementById("knowledge_figure_"+ i +"_input").value = document.getElementById("knowledge_figure_"+ (i+1) +"_input").value;//figure_path
|
|
76
|
+
//document.getElementById("knowledge_figure_"+ i +"_input").name = document.getElementById("knowledge_figure_"+ (i+1) +"_input").name;
|
|
77
|
+
document.getElementById("img_"+ i).src = document.getElementById("img_"+ (i+1)).src;
|
|
78
|
+
document.getElementById("link_to_img_"+ i).src = document.getElementById("link_to_img_"+ (i+1)).src;
|
|
79
|
+
}
|
|
80
|
+
var delete_field;
|
|
81
|
+
if (delete_field = document.getElementById("figure_field_"+ num_of_figure)){
|
|
82
|
+
delete_field.parentNode.removeChild(delete_field);
|
|
83
|
+
}
|
|
84
|
+
num_of_figure--;
|
|
85
|
+
var last_down_button;
|
|
86
|
+
if (last_down_button = document.getElementById("down_"+ num_of_figure)){
|
|
87
|
+
// delete down.png
|
|
88
|
+
var last_down_button_parent = last_down_button.parentNode;
|
|
89
|
+
last_down_button_parent.removeChild(last_down_button);
|
|
90
|
+
// add white.png
|
|
91
|
+
var down_img = document.createElement("img");
|
|
92
|
+
down_img.setAttribute("id", "down_alternative_"+ num_of_figure);
|
|
93
|
+
down_img.setAttribute("alt", "Down");
|
|
94
|
+
down_img.setAttribute("border", "0");
|
|
95
|
+
down_img.setAttribute("src", "/images/white.bmp");
|
|
96
|
+
down_img.setAttribute("height", "50");
|
|
97
|
+
down_img.setAttribute("width", "50");
|
|
98
|
+
last_down_button_parent.appendChild(down_img);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function moreFigure() {
|
|
105
|
+
if (num_of_figure === void 0) {
|
|
106
|
+
num_of_figure = 1;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (num_of_figure > 0) {
|
|
110
|
+
var down_swap_alternative = document.getElementById("down_alternative_"+ num_of_figure);
|
|
111
|
+
var down_swap_parent = down_swap_alternative.parentNode;
|
|
112
|
+
var down_swap = document.createElement("a");
|
|
113
|
+
down_swap.setAttribute("href", "#");
|
|
114
|
+
down_swap.setAttribute("id", "down_"+ num_of_figure);
|
|
115
|
+
if (navigator.appVersion.indexOf("MSIE") != -1) {
|
|
116
|
+
down_swap.setAttribute("onclick", new Function("swapFigure("+ num_of_figure + "); location.href='#knowledge_figure_form'; return false;"));//for Internet Explorer
|
|
117
|
+
} else {
|
|
118
|
+
down_swap.setAttribute("onclick", "swapFigure("+ num_of_figure + "); location.href='#knowledge_figure_form'; return false;");// for Firefox
|
|
119
|
+
}
|
|
120
|
+
var down_img = document.createElement("img");
|
|
121
|
+
down_img.setAttribute("alt", "Down");
|
|
122
|
+
down_img.setAttribute("border", "0");
|
|
123
|
+
down_img.setAttribute("src", "/images/down.png");
|
|
124
|
+
down_img.setAttribute("height", "50");
|
|
125
|
+
down_img.setAttribute("width", "50");
|
|
126
|
+
|
|
127
|
+
down_swap_parent.removeChild(down_swap_alternative);
|
|
128
|
+
down_swap_parent.appendChild(down_swap);
|
|
129
|
+
down_swap.appendChild(down_img);
|
|
130
|
+
}
|
|
131
|
+
num_of_figure++;
|
|
132
|
+
|
|
133
|
+
var outer_tr = document.createElement("tr");
|
|
134
|
+
var outer_td = document.createElement("td");
|
|
135
|
+
var fieldset = document.createElement("fieldset");
|
|
136
|
+
fieldset.setAttribute("id", "figure_field_"+ num_of_figure);
|
|
137
|
+
if (navigator.appVersion.indexOf("MSIE") != -1) {
|
|
138
|
+
fieldset.setAttribute("className", "form_fieldset");//for Internet Explorer
|
|
139
|
+
} else {
|
|
140
|
+
fieldset.setAttribute("class", "form_fieldset");//for Firefox
|
|
141
|
+
}
|
|
142
|
+
var legend = document.createElement("legend");
|
|
143
|
+
var legend_text = document.createTextNode("Figure "+ num_of_figure);
|
|
144
|
+
legend.appendChild(legend_text);
|
|
145
|
+
var table = document.createElement("table");
|
|
146
|
+
var tbody = document.createElement("tbody");
|
|
147
|
+
var tr = document.createElement("tr");
|
|
148
|
+
tr.setAttribute("valign", "top");
|
|
149
|
+
|
|
150
|
+
var td1 = document.createElement("td");
|
|
151
|
+
var up_swap = document.createElement("a");
|
|
152
|
+
up_swap.setAttribute("href", "#");
|
|
153
|
+
up_swap.setAttribute("id", "up_"+ num_of_figure);
|
|
154
|
+
if (navigator.appVersion.indexOf("MSIE") != -1) {
|
|
155
|
+
up_swap.setAttribute("onclick", new Function("swapFigure("+ (num_of_figure - 1) + "); location.href='#knowledge_figure_form'; return false;"));//for Internet Explorer
|
|
156
|
+
} else {
|
|
157
|
+
up_swap.setAttribute("onclick", "swapFigure("+ (num_of_figure - 1) + "); location.href='#knowledge_figure_form'; return false;");// for Firefox
|
|
158
|
+
}
|
|
159
|
+
var up_img = document.createElement("img");
|
|
160
|
+
up_img.setAttribute("id", "up_img_"+ num_of_figure);
|
|
161
|
+
up_img.setAttribute("alt", "Up");
|
|
162
|
+
up_img.setAttribute("border", "0");
|
|
163
|
+
up_img.setAttribute("src", "/images/up.png");
|
|
164
|
+
up_img.setAttribute("height", "50");
|
|
165
|
+
up_img.setAttribute("width", "50");
|
|
166
|
+
/*
|
|
167
|
+
var down_swap = document.createElement("a");
|
|
168
|
+
down_swap.setAttribute("href", "#");
|
|
169
|
+
down_swap.setAttribute("id", "down_"+ num_of_figure);
|
|
170
|
+
if (navigator.appVersion.indexOf("MSIE") != -1) {
|
|
171
|
+
down_swap.setAttribute("onclick", new Function("swapFigure("+ num_of_figure + "); location.href='#knowledge_figure_form'; return false;"));//for Internet Explorer
|
|
172
|
+
} else {
|
|
173
|
+
down_swap.setAttribute("onclick", "swapFigure("+ num_of_figure + "); location.href='#knowledge_figure_form'; return false;");// for Firefox
|
|
174
|
+
}
|
|
175
|
+
*/
|
|
176
|
+
var down_img = document.createElement("img");
|
|
177
|
+
down_img.setAttribute("id", "down_alternative_"+ num_of_figure);
|
|
178
|
+
down_img.setAttribute("alt", "Down");
|
|
179
|
+
down_img.setAttribute("border", "0");
|
|
180
|
+
down_img.setAttribute("src", "/images/white.bmp");
|
|
181
|
+
down_img.setAttribute("height", "50");
|
|
182
|
+
down_img.setAttribute("width", "50");
|
|
183
|
+
|
|
184
|
+
var td2 = document.createElement("td");
|
|
185
|
+
var caption_label = document.createTextNode("Caption:");
|
|
186
|
+
var caption = document.createElement("textarea");
|
|
187
|
+
caption.setAttribute("id", "knowledge_figure_"+ num_of_figure +"_figure_caption");
|
|
188
|
+
caption.setAttribute("name", "knowledge_figure["+ num_of_figure +"][figure_caption]");
|
|
189
|
+
caption.setAttribute("cols", "50");
|
|
190
|
+
caption.setAttribute("rows", "4");
|
|
191
|
+
var label = document.createElement("div");
|
|
192
|
+
label.setAttribute("id", "label_"+ num_of_figure);
|
|
193
|
+
var label_text = document.createTextNode("Figure Path:");
|
|
194
|
+
var figure_path = document.createElement("input");
|
|
195
|
+
figure_path.setAttribute("type", "text");
|
|
196
|
+
if (navigator.appVersion.indexOf("MSIE") != -1) {
|
|
197
|
+
figure_path.setAttribute("className", "textarea_size60");//for Internet Explorer
|
|
198
|
+
} else {
|
|
199
|
+
figure_path.setAttribute("class", "textarea_size60");//for Firefox
|
|
200
|
+
}
|
|
201
|
+
figure_path.setAttribute("id", "knowledge_figure_"+ num_of_figure +"_input");
|
|
202
|
+
figure_path.setAttribute("name", "knowledge_figure["+ num_of_figure +"][figure_path]");
|
|
203
|
+
figure_path.setAttribute("value", "");
|
|
204
|
+
var png_span = document.createElement("span");
|
|
205
|
+
png_span.setAttribute("id", "png_"+ num_of_figure);
|
|
206
|
+
var png = document.createTextNode(".png");
|
|
207
|
+
var diagram_id = document.createElement("input");
|
|
208
|
+
diagram_id.setAttribute("id", "knowledge_figure_"+ num_of_figure +"_diagram_id");
|
|
209
|
+
diagram_id.setAttribute("name", "knowledge_figure[<%= i %>][diagram_id]");
|
|
210
|
+
diagram_id.setAttribute("type", "hidden");
|
|
211
|
+
diagram_id.setAttribute("value", "");
|
|
212
|
+
var diagram_path = document.createElement("input");
|
|
213
|
+
diagram_path.setAttribute("id", "knowledge_figure_"+ num_of_figure +"_figure_path");
|
|
214
|
+
diagram_path.setAttribute("name", "knowledge_figure[<%= i %>][diagram_path]");
|
|
215
|
+
diagram_path.setAttribute("type", "hidden");
|
|
216
|
+
diagram_path.setAttribute("value", "");
|
|
217
|
+
|
|
218
|
+
var td3 = document.createElement("td");
|
|
219
|
+
var figure_img = document.createElement("img");
|
|
220
|
+
figure_img.setAttribute("src", "/images/white.bmp");
|
|
221
|
+
figure_img.setAttribute("id", "img_"+ num_of_figure);
|
|
222
|
+
figure_img.setAttribute("name", "img_"+ num_of_figure);
|
|
223
|
+
figure_img.setAttribute("width", "150");
|
|
224
|
+
figure_img.setAttribute("height", "150");
|
|
225
|
+
var link_to_img = document.createElement("a");
|
|
226
|
+
link_to_img.setAttribute("href", "'#knowledge_figure_form'");
|
|
227
|
+
link_to_img.setAttribute("id", "link_to_img_"+ num_of_figure);
|
|
228
|
+
link_to_img.setAttribute("name", "link_to_img_"+ num_of_figure);
|
|
229
|
+
var view_image = document.createElement("span");
|
|
230
|
+
view_image.setAttribute("id", "view_image_"+ num_of_figure);
|
|
231
|
+
var space = document.createTextNode("");
|
|
232
|
+
var td4 = document.createElement("td");
|
|
233
|
+
var delete_button = document.createElement("a");
|
|
234
|
+
delete_button.setAttribute("href", "#");
|
|
235
|
+
delete_button.setAttribute("id", "delete_figure_"+ num_of_figure);
|
|
236
|
+
if (navigator.appVersion.indexOf("MSIE") != -1) {
|
|
237
|
+
delete_button.setAttribute("onclick", new Function("deleteFigure("+ num_of_figure +");location.href='#knowledge_figure_form';return false;"));//for Internet Explorer
|
|
238
|
+
} else {
|
|
239
|
+
delete_button.setAttribute("onclick", "deleteFigure("+ num_of_figure +");location.href='#knowledge_figure_form';return false;");//for Firefox
|
|
240
|
+
}
|
|
241
|
+
var delete_img = document.createElement("img");
|
|
242
|
+
delete_img.setAttribute("alt", "X");
|
|
243
|
+
delete_img.setAttribute("border", "0");
|
|
244
|
+
delete_img.setAttribute("src", "/images/delete.png");
|
|
245
|
+
|
|
246
|
+
var knowledge_figure_tbody = document.getElementById("knowledge_figure_tbody");
|
|
247
|
+
knowledge_figure_tbody.appendChild(outer_tr);
|
|
248
|
+
outer_tr.appendChild(outer_td);
|
|
249
|
+
outer_td.appendChild(fieldset);
|
|
250
|
+
fieldset.appendChild(legend);
|
|
251
|
+
fieldset.appendChild(table);
|
|
252
|
+
table.appendChild(tbody);
|
|
253
|
+
tbody.appendChild(tr);
|
|
254
|
+
tr.appendChild(td1);
|
|
255
|
+
td1.appendChild(document.createElement("br"));
|
|
256
|
+
td1.appendChild(up_swap);
|
|
257
|
+
up_swap.appendChild(up_img);
|
|
258
|
+
td1.appendChild(document.createElement("br"));
|
|
259
|
+
td1.appendChild(document.createElement("br"));
|
|
260
|
+
td1.appendChild(down_img);
|
|
261
|
+
tr.appendChild(td2);
|
|
262
|
+
td2.appendChild(caption_label);
|
|
263
|
+
td2.appendChild(document.createElement("br"));
|
|
264
|
+
td2.appendChild(caption);
|
|
265
|
+
td2.appendChild(document.createElement("br"));
|
|
266
|
+
td2.appendChild(label)
|
|
267
|
+
label.appendChild(label_text);
|
|
268
|
+
td2.appendChild(figure_path);
|
|
269
|
+
td2.appendChild(png_span);
|
|
270
|
+
png_span.appendChild(png);
|
|
271
|
+
td2.appendChild(diagram_id);
|
|
272
|
+
td2.appendChild(diagram_path);
|
|
273
|
+
td2.appendChild(document.createElement("br"));
|
|
274
|
+
tr.appendChild(td3);
|
|
275
|
+
td3.appendChild(figure_img);
|
|
276
|
+
td3.appendChild(document.createElement("br"));
|
|
277
|
+
td3.appendChild(link_to_img);
|
|
278
|
+
link_to_img.appendChild(view_image);
|
|
279
|
+
view_image.appendChild(space);
|
|
280
|
+
tr.appendChild(td4);
|
|
281
|
+
td4.appendChild(delete_button);
|
|
282
|
+
delete_button.appendChild(delete_img);
|
|
283
|
+
|
|
284
|
+
var first_up_button;
|
|
285
|
+
if (first_up_button = document.getElementById("up_1")){
|
|
286
|
+
first_up_button.parentNode.removeChild(first_up_button);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
function putNumSelectMenu(n){
|
|
291
|
+
select_menu = document.getElementById("knowledge_horizontal_figures");
|
|
292
|
+
if (n == 0) {
|
|
293
|
+
select_menu.disabled = false;
|
|
294
|
+
} else {
|
|
295
|
+
select_menu.disabled = true;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function putCategory(id){
|
|
300
|
+
select = document.getElementById(id);
|
|
301
|
+
category = document.getElementById("knowledge_category");
|
|
302
|
+
category.value = select.title;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
function showCommentListShort () {
|
|
306
|
+
comment_list_short = document.getElementById("comment_list_short")
|
|
307
|
+
comment_list_short_button = document.getElementById("comment_list_short_button")
|
|
308
|
+
comment_list_hide = document.getElementById("comment_list_hide")
|
|
309
|
+
comment_list_hide_button = document.getElementById("comment_list_hide_button")
|
|
310
|
+
comment_list_all = document.getElementById("comment_list_all")
|
|
311
|
+
comment_list_all_button = document.getElementById("comment_list_all_button")
|
|
312
|
+
|
|
313
|
+
comment_list_short.style.display = "block";
|
|
314
|
+
comment_list_short_button.style.borderStyle = "solid";
|
|
315
|
+
comment_list_hide.style.display = "none";
|
|
316
|
+
comment_list_hide_button.style.borderStyle = "none";
|
|
317
|
+
comment_list_all.style.display = "none";
|
|
318
|
+
comment_list_all_button.style.borderStyle = "none";
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function showCommentListHide () {
|
|
322
|
+
comment_list_short = document.getElementById("comment_list_short")
|
|
323
|
+
comment_list_short_button = document.getElementById("comment_list_short_button")
|
|
324
|
+
comment_list_hide = document.getElementById("comment_list_hide")
|
|
325
|
+
comment_list_hide_button = document.getElementById("comment_list_hide_button")
|
|
326
|
+
comment_list_all = document.getElementById("comment_list_all")
|
|
327
|
+
comment_list_all_button = document.getElementById("comment_list_all_button")
|
|
328
|
+
|
|
329
|
+
comment_list_short.style.display = "none";
|
|
330
|
+
comment_list_short_button.style.borderStyle = "none";
|
|
331
|
+
comment_list_hide.style.display = "block";
|
|
332
|
+
comment_list_hide_button.style.borderStyle = "solid";
|
|
333
|
+
comment_list_all.style.display = "none";
|
|
334
|
+
comment_list_all_button.style.borderStyle = "none";
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
function showCommentListAll () {
|
|
338
|
+
comment_list_short = document.getElementById("comment_list_short")
|
|
339
|
+
comment_list_short_button = document.getElementById("comment_list_short_button")
|
|
340
|
+
comment_list_hide = document.getElementById("comment_list_hide")
|
|
341
|
+
comment_list_hide_button = document.getElementById("comment_list_hide_button")
|
|
342
|
+
comment_list_all = document.getElementById("comment_list_all")
|
|
343
|
+
comment_list_all_button = document.getElementById("comment_list_all_button")
|
|
344
|
+
|
|
345
|
+
comment_list_short.style.display = "none";
|
|
346
|
+
comment_list_short_button.style.borderStyle = "none";
|
|
347
|
+
comment_list_hide.style.display = "none";
|
|
348
|
+
comment_list_hide_button.style.borderStyle = "none";
|
|
349
|
+
comment_list_all.style.display = "block";
|
|
350
|
+
comment_list_all_button.style.borderStyle = "solid";
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
function deleteDisplayCommentInputFormButton () {
|
|
354
|
+
display_comment_input_form_button = document.getElementById("display_comment_input_form_button");
|
|
355
|
+
display_comment_input_form_button.style.display = "none";
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
function enableButton (button_id) {
|
|
359
|
+
button = document.getElementById(button_id);
|
|
360
|
+
button.style.display = "block";
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function restoreDocument (title, textbody, creator, default_layout, horizontal_figures, figures_size_status, figures_size_number) {
|
|
364
|
+
document.getElementById("knowledge_title").value = title;
|
|
365
|
+
document.getElementById("knowledge_textbody").value = textbody;
|
|
366
|
+
document.getElementById("knowledge_creator").value = creator;
|
|
367
|
+
|
|
368
|
+
document.getElementById("knowledge_default_layout").selectedIndex = Number(default_layout);
|
|
369
|
+
document.getElementById("knowledge_horizontal_figures").value = Number(horizontal_figures);
|
|
370
|
+
|
|
371
|
+
document.getElementById("knowledge[height_or_width]").selectedIndex = Number(figures_size_status) % 2;
|
|
372
|
+
document.getElementById("knowledge[figures_size_number]").value = Number(figures_size_number);
|
|
373
|
+
document.getElementById("knowledge[percent_or_pixel]").selectedIndex = Number(figures_size_status) / 2;
|
|
374
|
+
|
|
375
|
+
//�O���[�v�֘A�ƊG���܂��ł��ĂȂ�
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
function restoreDocumentIncludePath (title, textbody, creator, default_layout, horizontal_figures, figures_size_status, figures_size_number, path) {
|
|
379
|
+
document.getElementById("node_path").value = path;
|
|
380
|
+
restoreDocument(title, textbody, creator, default_layout, horizontal_figures, figures_size_status, figures_size_number);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|