rapid-router 5.18.0__py2.py3-none-any.whl → 7.6.8__py2.py3-none-any.whl
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.
- example_project/rapid_router_test_settings.py +19 -7
- example_project/settings.py +21 -8
- example_project/urls.py +5 -6
- game/__init__.py +1 -1
- game/admin.py +7 -2
- game/character.py +8 -0
- game/decor.py +40 -0
- game/end_to_end_tests/base_game_test.py +34 -27
- game/end_to_end_tests/editor_page.py +15 -0
- game/end_to_end_tests/game_page.py +88 -20
- game/end_to_end_tests/selenium_test_case.py +1 -20
- game/end_to_end_tests/test_cow_crashes.py +3 -5
- game/end_to_end_tests/test_level_editor.py +273 -10
- game/end_to_end_tests/test_level_selection.py +25 -3
- game/end_to_end_tests/test_play_through.py +222 -127
- game/end_to_end_tests/test_python_levels.py +41 -7
- game/end_to_end_tests/test_saving_workspace.py +2 -1
- game/forms.py +7 -1
- game/level_management.py +26 -11
- game/messages.py +899 -337
- game/migrations/0001_squashed_0025_levels_ordering_pt1.py +19 -1
- game/migrations/0026_levels_pt2.py +13 -2
- game/migrations/0032_cannot_turn_left_level.py +13 -2
- game/migrations/0033_recursion_level.py +13 -2
- game/migrations/0034_joes_level.py +13 -2
- game/migrations/0035_disable_route_score_level_70.py +0 -2
- game/migrations/0036_level_score_73.py +0 -2
- game/migrations/0037_level_score_79.py +0 -2
- game/migrations/0038_level_score_40.py +0 -1
- game/migrations/0042_level_score_73.py +0 -2
- game/migrations/0048_add_cow_field_and_blocks.py +0 -2
- game/migrations/0049_level_score_34.py +0 -2
- game/migrations/0050_level_score_40.py +0 -2
- game/migrations/0051_level_score_49.py +0 -1
- game/migrations/0086_loop_levels.py +13 -2
- game/migrations/0092_disable_algo_score_in_custom_levels.py +28 -0
- game/migrations/0093_alter_level_character_name.py +18 -0
- game/migrations/0094_add_hint_lesson_subtitle_to_levels.py +28 -0
- game/migrations/0095_level_commands.py +18 -0
- game/migrations/0096_alter_level_commands.py +18 -0
- game/migrations/0097_add_python_den_levels.py +1515 -0
- game/migrations/0098_add_episode_link_fields.py +44 -0
- game/migrations/0099_python_episodes_links.py +103 -0
- game/migrations/0100_reorder_python_levels.py +179 -0
- game/migrations/0101_rename_episodes.py +45 -0
- game/migrations/0102_reoder_episodes_13_14.py +136 -0
- game/migrations/0103_level_1015_solution.py +26 -0
- game/migrations/0104_remove_level_direct_drive.py +17 -0
- game/migrations/0105_delete_invalid_attempts.py +18 -0
- game/migrations/0106_fields_to_snake_case.py +48 -0
- game/migrations/0107_rename_worksheet_link_episode_student_worksheet_link.py +18 -0
- game/migrations/0108_episode_indy_worksheet_link.py +18 -0
- game/migrations/0109_create_episodes_23_and_24.py +99 -0
- game/migrations/0110_remove_episode_indy_worksheet_link_and_more.py +100 -0
- game/migrations/0111_create_worksheets.py +149 -0
- game/migrations/0112_worksheet_locked_classes.py +21 -0
- game/migrations/0113_level_needs_approval.py +18 -0
- game/migrations/0114_default_and_non_student_levels_no_approval.py +31 -0
- game/migrations/0115_level_level__default_does_not_need_approval.py +22 -0
- game/migrations/0116_update_worksheet_video_links.py +68 -0
- game/migrations/0117_update_solutions_to_if_else.py +61 -0
- game/models.py +127 -17
- game/permissions.py +51 -19
- game/python_den_urls.py +26 -0
- game/random_road.py +9 -9
- game/serializers.py +12 -17
- game/static/django_reverse_js/js/reverse.js +171 -0
- game/static/game/css/LilitaOne-Regular.ttf +0 -0
- game/static/game/css/backgrounds.css +8 -12
- game/static/game/css/dataTables.custom.css +3 -2
- game/static/game/css/editor.css +47 -0
- game/static/game/css/game.css +37 -43
- game/static/game/css/game_screen.css +16 -0
- game/static/game/css/level_editor.css +5 -0
- game/static/game/css/level_selection.css +17 -2
- game/static/game/image/Python_Den_hero_student.png +0 -0
- game/static/game/image/Python_levels_page.svg +1954 -0
- game/static/game/image/characters/front_view/Electric_van.svg +448 -0
- game/static/game/image/characters/top_view/Electric_van.svg +448 -0
- game/static/game/image/decor/city/solar_panel.svg +1200 -0
- game/static/game/image/decor/farm/solar_panel.svg +86 -0
- game/static/game/image/decor/grass/solar_panel.svg +86 -0
- game/static/game/image/decor/snow/solar_panel.svg +173 -0
- game/static/game/image/electric_van.svg +448 -0
- game/static/game/image/icons/description.svg +1 -0
- game/static/game/image/icons/hint.svg +1 -0
- game/static/game/image/icons/python.svg +1 -1
- game/static/game/image/pigeon.svg +684 -0
- game/static/game/image/python_den_header.svg +19 -0
- game/static/game/js/animation.js +65 -24
- game/static/game/js/blockly/msg/js/bg.js +52 -1
- game/static/game/js/blockly/msg/js/ca.js +52 -1
- game/static/game/js/blockly/msg/js/en-gb.js +2 -0
- game/static/game/js/blockly/msg/js/en.js +2 -0
- game/static/game/js/blockly/msg/js/es.js +52 -1
- game/static/game/js/blockly/msg/js/fr.js +2 -0
- game/static/game/js/blockly/msg/js/hi.js +2 -0
- game/static/game/js/blockly/msg/js/it.js +52 -1
- game/static/game/js/blockly/msg/js/pl.js +52 -1
- game/static/game/js/blockly/msg/js/pt-br.js +52 -1
- game/static/game/js/blockly/msg/js/ru.js +52 -1
- game/static/game/js/blockly/msg/js/ur.js +52 -1
- game/static/game/js/blocklyCustomBlocks.js +93 -52
- game/static/game/js/button.js +12 -0
- game/static/game/js/cow.js +11 -7
- game/static/game/js/drawing.js +68 -29
- game/static/game/js/editor.js +23 -0
- game/static/game/js/game.js +74 -110
- game/static/game/js/level_editor.js +646 -274
- game/static/game/js/level_moderation.js +33 -2
- game/static/game/js/level_selection.js +1 -1
- game/static/game/js/loadLanguages.js +2 -2
- game/static/game/js/model.js +32 -2
- game/static/game/js/pythonControl.js +14 -1
- game/static/game/js/scoreboard.js +0 -37
- game/static/game/js/scoreboardSharedLevels.js +48 -0
- game/static/game/js/skulpt/skulpt-stdlib.js +1 -1
- game/static/game/js/sound.js +52 -5
- game/static/game/raphael_image/characters/top_view/Electric_van.svg +448 -0
- game/static/game/raphael_image/decor/city/solar_panel.svg +1200 -0
- game/static/game/raphael_image/decor/farm/solar_panel.svg +86 -0
- game/static/game/raphael_image/decor/grass/solar_panel.svg +86 -0
- game/static/game/raphael_image/decor/snow/solar_panel.svg +173 -0
- game/static/game/raphael_image/pigeon.svg +685 -0
- game/static/game/sass/game.scss +2 -2
- game/static/game/sound/clown_horn.mp3 +0 -0
- game/static/game/sound/clown_horn.ogg +0 -0
- game/static/game/sound/electric_van_starting.mp3 +0 -0
- game/static/game/sound/electric_van_starting.ogg +0 -0
- game/static/game/sound/pigeon.mp3 +0 -0
- game/static/game/sound/pigeon.ogg +0 -0
- game/static/game/sound/sleigh_bells.mp3 +0 -0
- game/static/game/sound/sleigh_bells.ogg +0 -0
- game/static/game/sound/sleigh_crash.mp3 +0 -0
- game/static/game/sound/sleigh_crash.ogg +0 -0
- game/templates/game/base.html +34 -14
- game/templates/game/basenonav.html +11 -5
- game/templates/game/game.html +142 -38
- game/templates/game/level_editor.html +340 -236
- game/templates/game/level_moderation.html +19 -6
- game/templates/game/level_selection.html +18 -110
- game/templates/game/python_den_level_selection.html +291 -0
- game/templates/game/python_den_worksheet.html +101 -0
- game/templates/game/scoreboard.html +83 -64
- game/tests/test_level_editor.py +94 -26
- game/tests/test_level_selection.py +149 -46
- game/tests/test_python_den_worksheet.py +85 -0
- game/tests/test_scoreboard.py +34 -7
- game/tests/utils/level.py +32 -26
- game/theme.py +5 -5
- game/urls.py +199 -61
- game/views/language_code_conversions.py +86 -86
- game/views/level.py +155 -63
- game/views/level_editor.py +88 -55
- game/views/level_moderation.py +23 -0
- game/views/level_selection.py +116 -47
- game/views/level_solutions.py +491 -106
- game/views/scoreboard.py +76 -51
- game/views/worksheet.py +25 -0
- rapid_router-7.6.8.dist-info/METADATA +174 -0
- {rapid_router-5.18.0.dist-info → rapid_router-7.6.8.dist-info}/RECORD +164 -104
- {rapid_router-5.18.0.dist-info → rapid_router-7.6.8.dist-info}/WHEEL +1 -1
- example_project/manage.py +0 -10
- game/static/game/image/actions/go.svg +0 -18
- game/static/game/js/js-reverse.js +0 -14
- game/static/game/js/pqselect.min.js +0 -9
- game/static/game/js/widget-scroller.js +0 -906
- rapid_router-5.18.0.dist-info/METADATA +0 -17
- {rapid_router-5.18.0.dist-info → rapid_router-7.6.8.dist-info/licenses}/LICENSE.md +0 -0
- {rapid_router-5.18.0.dist-info → rapid_router-7.6.8.dist-info}/top_level.txt +0 -0
example_project/manage.py
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
-
<svg version="1.0"
|
|
4
|
-
id="Layer_1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
5
|
-
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="100px" height="100px"
|
|
6
|
-
viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
|
|
7
|
-
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="175.6106" y1="317.13" x2="175.6106" y2="422.46" gradientTransform="matrix(1 0 0 1 -125.6106 -301.6093)">
|
|
8
|
-
<stop offset="0" style="stop-color:#8BC53F"/>
|
|
9
|
-
<stop offset="1" style="stop-color:#009145"/>
|
|
10
|
-
</linearGradient>
|
|
11
|
-
<circle fill="url(#SVGID_1_)" stroke="#009145" stroke-width="5" stroke-miterlimit="10" cx="50" cy="50" r="44.5"/>
|
|
12
|
-
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="175.6106" y1="317.39" x2="175.6106" y2="383.26" gradientTransform="matrix(1 0 0 1 -125.6106 -301.6093)">
|
|
13
|
-
<stop offset="5.100000e-03" style="stop-color:#FFFFFF;stop-opacity:0.4"/>
|
|
14
|
-
<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
|
|
15
|
-
</linearGradient>
|
|
16
|
-
<path fill="url(#SVGID_2_)" d="M87,47c0,20.4-16.5,27-37,27s-37-6.5-37-27c0-20.4,16.5-35,37-35S87,26.6,87,47z"/>
|
|
17
|
-
<polygon points="40,22.1 40,77.9 68,50 "/>
|
|
18
|
-
</svg>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
this.Urls=(function(){"use strict";var data={"urls":[["about",[["about",[]]]],["admin:aimmo_avatar_add",[["administration/aimmo/avatar/add/",[]]]],["admin:aimmo_avatar_change",[["administration/aimmo/avatar/%(object_id)s/change/",["object_id"]]]],["admin:aimmo_avatar_changelist",[["administration/aimmo/avatar/",[]]]],["admin:aimmo_avatar_delete",[["administration/aimmo/avatar/%(object_id)s/delete/",["object_id"]]]],["admin:aimmo_avatar_history",[["administration/aimmo/avatar/%(object_id)s/history/",["object_id"]]]],["admin:aimmo_game_add",[["administration/aimmo/game/add/",[]]]],["admin:aimmo_game_change",[["administration/aimmo/game/%(object_id)s/change/",["object_id"]]]],["admin:aimmo_game_changelist",[["administration/aimmo/game/",[]]]],["admin:aimmo_game_delete",[["administration/aimmo/game/%(object_id)s/delete/",["object_id"]]]],["admin:aimmo_game_history",[["administration/aimmo/game/%(object_id)s/history/",["object_id"]]]],["admin:app_list",[["administration/%(app_label)s/",["app_label"]]]],["admin:auth_group_add",[["administration/auth/group/add/",[]]]],["admin:auth_group_change",[["administration/auth/group/%(object_id)s/change/",["object_id"]]]],["admin:auth_group_changelist",[["administration/auth/group/",[]]]],["admin:auth_group_delete",[["administration/auth/group/%(object_id)s/delete/",["object_id"]]]],["admin:auth_group_history",[["administration/auth/group/%(object_id)s/history/",["object_id"]]]],["admin:auth_user_add",[["administration/auth/user/add/",[]]]],["admin:auth_user_change",[["administration/auth/user/%(object_id)s/change/",["object_id"]]]],["admin:auth_user_changelist",[["administration/auth/user/",[]]]],["admin:auth_user_delete",[["administration/auth/user/%(object_id)s/delete/",["object_id"]]]],["admin:auth_user_history",[["administration/auth/user/%(object_id)s/history/",["object_id"]]]],["admin:auth_user_password_change",[["administration/auth/user/%(id)s/password/",["id"]]]],["admin:autocomplete",[["administration/autocomplete/",[]]]],["admin:common_class_add",[["administration/common/class/add/",[]]]],["admin:common_class_change",[["administration/common/class/%(object_id)s/change/",["object_id"]]]],["admin:common_class_changelist",[["administration/common/class/",[]]]],["admin:common_class_delete",[["administration/common/class/%(object_id)s/delete/",["object_id"]]]],["admin:common_class_history",[["administration/common/class/%(object_id)s/history/",["object_id"]]]],["admin:common_dailyactivity_add",[["administration/common/dailyactivity/add/",[]]]],["admin:common_dailyactivity_change",[["administration/common/dailyactivity/%(object_id)s/change/",["object_id"]]]],["admin:common_dailyactivity_changelist",[["administration/common/dailyactivity/",[]]]],["admin:common_dailyactivity_delete",[["administration/common/dailyactivity/%(object_id)s/delete/",["object_id"]]]],["admin:common_dailyactivity_history",[["administration/common/dailyactivity/%(object_id)s/history/",["object_id"]]]],["admin:common_dynamicelement_add",[["administration/common/dynamicelement/add/",[]]]],["admin:common_dynamicelement_change",[["administration/common/dynamicelement/%(object_id)s/change/",["object_id"]]]],["admin:common_dynamicelement_changelist",[["administration/common/dynamicelement/",[]]]],["admin:common_dynamicelement_delete",[["administration/common/dynamicelement/%(object_id)s/delete/",["object_id"]]]],["admin:common_dynamicelement_history",[["administration/common/dynamicelement/%(object_id)s/history/",["object_id"]]]],["admin:common_school_add",[["administration/common/school/add/",[]]]],["admin:common_school_change",[["administration/common/school/%(object_id)s/change/",["object_id"]]]],["admin:common_school_changelist",[["administration/common/school/",[]]]],["admin:common_school_delete",[["administration/common/school/%(object_id)s/delete/",["object_id"]]]],["admin:common_school_history",[["administration/common/school/%(object_id)s/history/",["object_id"]]]],["admin:common_schoolteacherinvitation_add",[["administration/common/schoolteacherinvitation/add/",[]]]],["admin:common_schoolteacherinvitation_change",[["administration/common/schoolteacherinvitation/%(object_id)s/change/",["object_id"]]]],["admin:common_schoolteacherinvitation_changelist",[["administration/common/schoolteacherinvitation/",[]]]],["admin:common_schoolteacherinvitation_delete",[["administration/common/schoolteacherinvitation/%(object_id)s/delete/",["object_id"]]]],["admin:common_schoolteacherinvitation_history",[["administration/common/schoolteacherinvitation/%(object_id)s/history/",["object_id"]]]],["admin:common_student_add",[["administration/common/student/add/",[]]]],["admin:common_student_change",[["administration/common/student/%(object_id)s/change/",["object_id"]]]],["admin:common_student_changelist",[["administration/common/student/",[]]]],["admin:common_student_delete",[["administration/common/student/%(object_id)s/delete/",["object_id"]]]],["admin:common_student_history",[["administration/common/student/%(object_id)s/history/",["object_id"]]]],["admin:common_teacher_add",[["administration/common/teacher/add/",[]]]],["admin:common_teacher_change",[["administration/common/teacher/%(object_id)s/change/",["object_id"]]]],["admin:common_teacher_changelist",[["administration/common/teacher/",[]]]],["admin:common_teacher_delete",[["administration/common/teacher/%(object_id)s/delete/",["object_id"]]]],["admin:common_teacher_history",[["administration/common/teacher/%(object_id)s/history/",["object_id"]]]],["admin:common_totalactivity_add",[["administration/common/totalactivity/add/",[]]]],["admin:common_totalactivity_change",[["administration/common/totalactivity/%(object_id)s/change/",["object_id"]]]],["admin:common_totalactivity_changelist",[["administration/common/totalactivity/",[]]]],["admin:common_totalactivity_delete",[["administration/common/totalactivity/%(object_id)s/delete/",["object_id"]]]],["admin:common_totalactivity_history",[["administration/common/totalactivity/%(object_id)s/history/",["object_id"]]]],["admin:common_userprofile_add",[["administration/common/userprofile/add/",[]]]],["admin:common_userprofile_change",[["administration/common/userprofile/%(object_id)s/change/",["object_id"]]]],["admin:common_userprofile_changelist",[["administration/common/userprofile/",[]]]],["admin:common_userprofile_delete",[["administration/common/userprofile/%(object_id)s/delete/",["object_id"]]]],["admin:common_userprofile_history",[["administration/common/userprofile/%(object_id)s/history/",["object_id"]]]],["admin:game_attempt_add",[["administration/game/attempt/add/",[]]]],["admin:game_attempt_change",[["administration/game/attempt/%(object_id)s/change/",["object_id"]]]],["admin:game_attempt_changelist",[["administration/game/attempt/",[]]]],["admin:game_attempt_delete",[["administration/game/attempt/%(object_id)s/delete/",["object_id"]]]],["admin:game_attempt_history",[["administration/game/attempt/%(object_id)s/history/",["object_id"]]]],["admin:game_block_add",[["administration/game/block/add/",[]]]],["admin:game_block_change",[["administration/game/block/%(object_id)s/change/",["object_id"]]]],["admin:game_block_changelist",[["administration/game/block/",[]]]],["admin:game_block_delete",[["administration/game/block/%(object_id)s/delete/",["object_id"]]]],["admin:game_block_history",[["administration/game/block/%(object_id)s/history/",["object_id"]]]],["admin:game_episode_add",[["administration/game/episode/add/",[]]]],["admin:game_episode_change",[["administration/game/episode/%(object_id)s/change/",["object_id"]]]],["admin:game_episode_changelist",[["administration/game/episode/",[]]]],["admin:game_episode_delete",[["administration/game/episode/%(object_id)s/delete/",["object_id"]]]],["admin:game_episode_history",[["administration/game/episode/%(object_id)s/history/",["object_id"]]]],["admin:game_level_add",[["administration/game/level/add/",[]]]],["admin:game_level_change",[["administration/game/level/%(object_id)s/change/",["object_id"]]]],["admin:game_level_changelist",[["administration/game/level/",[]]]],["admin:game_level_delete",[["administration/game/level/%(object_id)s/delete/",["object_id"]]]],["admin:game_level_history",[["administration/game/level/%(object_id)s/history/",["object_id"]]]],["admin:game_leveldecor_add",[["administration/game/leveldecor/add/",[]]]],["admin:game_leveldecor_change",[["administration/game/leveldecor/%(object_id)s/change/",["object_id"]]]],["admin:game_leveldecor_changelist",[["administration/game/leveldecor/",[]]]],["admin:game_leveldecor_delete",[["administration/game/leveldecor/%(object_id)s/delete/",["object_id"]]]],["admin:game_leveldecor_history",[["administration/game/leveldecor/%(object_id)s/history/",["object_id"]]]],["admin:game_workspace_add",[["administration/game/workspace/add/",[]]]],["admin:game_workspace_change",[["administration/game/workspace/%(object_id)s/change/",["object_id"]]]],["admin:game_workspace_changelist",[["administration/game/workspace/",[]]]],["admin:game_workspace_delete",[["administration/game/workspace/%(object_id)s/delete/",["object_id"]]]],["admin:game_workspace_history",[["administration/game/workspace/%(object_id)s/history/",["object_id"]]]],["admin:index",[["administration/",[]]]],["admin:jsi18n",[["administration/jsi18n/",[]]]],["admin:login",[["administration/login/",[]]]],["admin:logout",[["administration/logout/",[]]]],["admin:otp_static_staticdevice_add",[["administration/otp_static/staticdevice/add/",[]]]],["admin:otp_static_staticdevice_change",[["administration/otp_static/staticdevice/%(object_id)s/change/",["object_id"]]]],["admin:otp_static_staticdevice_changelist",[["administration/otp_static/staticdevice/",[]]]],["admin:otp_static_staticdevice_delete",[["administration/otp_static/staticdevice/%(object_id)s/delete/",["object_id"]]]],["admin:otp_static_staticdevice_history",[["administration/otp_static/staticdevice/%(object_id)s/history/",["object_id"]]]],["admin:otp_totp_totpdevice_add",[["administration/otp_totp/totpdevice/add/",[]]]],["admin:otp_totp_totpdevice_change",[["administration/otp_totp/totpdevice/%(object_id)s/change/",["object_id"]]]],["admin:otp_totp_totpdevice_changelist",[["administration/otp_totp/totpdevice/",[]]]],["admin:otp_totp_totpdevice_config",[["administration/otp_totp/totpdevice/%(pk)s/config/",["pk"]]]],["admin:otp_totp_totpdevice_delete",[["administration/otp_totp/totpdevice/%(object_id)s/delete/",["object_id"]]]],["admin:otp_totp_totpdevice_history",[["administration/otp_totp/totpdevice/%(object_id)s/history/",["object_id"]]]],["admin:otp_totp_totpdevice_qrcode",[["administration/otp_totp/totpdevice/%(pk)s/qrcode/",["pk"]]]],["admin:password_change",[["administration/password_change/",[]]]],["admin:password_change_done",[["administration/password_change/done/",[]]]],["admin:sites_site_add",[["administration/sites/site/add/",[]]]],["admin:sites_site_change",[["administration/sites/site/%(object_id)s/change/",["object_id"]]]],["admin:sites_site_changelist",[["administration/sites/site/",[]]]],["admin:sites_site_delete",[["administration/sites/site/%(object_id)s/delete/",["object_id"]]]],["admin:sites_site_history",[["administration/sites/site/%(object_id)s/history/",["object_id"]]]],["admin:two_factor_phonedevice_add",[["administration/two_factor/phonedevice/add/",[]]]],["admin:two_factor_phonedevice_change",[["administration/two_factor/phonedevice/%(object_id)s/change/",["object_id"]]]],["admin:two_factor_phonedevice_changelist",[["administration/two_factor/phonedevice/",[]]]],["admin:two_factor_phonedevice_delete",[["administration/two_factor/phonedevice/%(object_id)s/delete/",["object_id"]]]],["admin:two_factor_phonedevice_history",[["administration/two_factor/phonedevice/%(object_id)s/history/",["object_id"]]]],["admin:view_on_site",[["administration/r/%(content_type_id)s/%(object_id)s/",["content_type_id","object_id"]]]],["administration_password_change",[["administration/password_change/",[]]]],["administration_password_change_done",[["administration/password_change_done/",[]]]],["anonymise-unverified-accounts",[["cron/user/unverified/delete/",[]]]],["anonymise_orphan_schools",[["schools/anonymise/%(start_id)s/",["start_id"]]]],["block-detail",[["rapidrouter/api/blocks/%(pk)s/",["pk"]]]],["block-list",[["rapidrouter/api/blocks/",[]]]],["character-detail",[["rapidrouter/api/characters/%(pk)s/",["pk"]]]],["character-list",[["rapidrouter/api/characters/",[]]]],["codingClub",[["codingClub/",[]]]],["consent_form",[["consent_form/",[]]]],["contribute",[["contribute",[]]]],["dashboard",[["teach/dashboard/",[]]]],["decor-detail",[["rapidrouter/api/decors/%(pk)s/",["pk"]]]],["decor-list",[["rapidrouter/api/decors/",[]]]],["delete_account",[["delete/account/",[]]]],["delete_level",[["rapidrouter/level_moderation/delete/%(levelID)s/",["levelID"]]]],["delete_level_for_editor",[["rapidrouter/level_editor/delete/%(levelId)s/",["levelId"]]]],["delete_teacher_invite",[["teach/dashboard/delete_teacher_invite/%(token)s",["token"]]]],["delete_workspace",[["rapidrouter/workspace/delete/%(workspaceID)s/",["workspaceID"]]]],["download_student_pack",[["codingClub/%(student_pack_type)s/",["student_pack_type"]]]],["email_verification",[["verify_email/",[]]]],["episode-detail",[["rapidrouter/api/episodes/%(pk)s/",["pk"]]]],["episode-list",[["rapidrouter/api/episodes/",[]]]],["first-verify-email-reminder",[["cron/user/unverified/send-first-reminder/",[]]]],["game-delete-games",[["kurono/api/games/delete_games/",[]],["kurono/api/games/delete_games/",[]]]],["game-detail",[["kurono/api/games/%(pk)s/",["pk"]],["kurono/api/games/%(pk)s/",["pk"]]]],["game-list",[["kurono/api/games/",[]],["kurono/api/games/",[]]]],["game-running",[["kurono/api/games/running/",[]],["kurono/api/games/running/",[]]]],["generate_random_map_for_editor",[["rapidrouter/level_editor/random/",[]]]],["get_sharing_information_for_editor",[["rapidrouter/level_editor/get_sharing_information/%(levelID)s/",["levelID"]]]],["getinvolved",[["getinvolved",[]]]],["home",[["",[]]]],["home-learning",[["home-learning",[]]]],["inactive_users",[["users/inactive/",[]]]],["independent_edit_account",[["play/account/independent/",[]]]],["independent_student_details",[["play/details/independent",[]]]],["independent_student_login",[["login/independent/",[]]]],["invite_toggle_admin",[["teach/dashboard/toggle_admin_invite/%(invite_id)s/",["invite_id"]]]],["invited_teacher",[["invited_teacher/%(token)s/",["token"]]]],["js-reverse",[["rapidrouter/js-reverse/",[]]]],["kurono/badges",[["kurono/api/badges/%(id)s/",["id"]],["kurono/api/badges/%(id)s/",["id"]]]],["kurono/code",[["kurono/api/code/%(id)s/",["id"]],["kurono/api/code/%(id)s/",["id"]]]],["kurono/connection_parameters",[["kurono/api/games/%(game_id)s/connection_parameters/",["game_id"]],["kurono/api/games/%(game_id)s/connection_parameters/",["game_id"]]]],["kurono/game_token",[["kurono/api/games/%(id)s/token/",["id"]],["kurono/api/games/%(id)s/token/",["id"]]]],["kurono/game_user_details",[["kurono/api/games/%(id)s/users/",["id"]],["kurono/api/games/%(id)s/users/",["id"]]]],["kurono/js_reverse",[["kurono/jsreverse/",[]],["kurono/jsreverse/",[]]]],["kurono/play",[["kurono/play/%(id)s/",["id"]],["kurono/play/%(id)s/",["id"]]]],["kurono/statistics",[["kurono/statistics/",[]],["kurono/statistics/",[]]]],["last-connected-since",[["api/lastconnectedsince/%(year)s/%(month)s/%(day)s/",["year","month","day"]]]],["level-detail",[["rapidrouter/api/levels/%(pk)s/",["pk"]]]],["level-for-episode",[["rapidrouter/api/episodes/%(pk)s/levels/",["pk"]]]],["level-list",[["rapidrouter/api/levels/",[]]]],["level_editor",[["rapidrouter/level_editor/",[]]]],["level_editor_chosen_level",[["rapidrouter/level_editor/%(levelId)s/",["levelId"]]]],["level_moderation",[["rapidrouter/level_moderation/",[]]]],["levelblock-detail",[["rapidrouter/api/levelblocks/%(pk)s/",["pk"]]]],["levelblock-for-level",[["rapidrouter/api/levels/%(pk)s/blocks/",["pk"]]]],["leveldecor-detail",[["rapidrouter/api/leveldecors/%(pk)s/",["pk"]]]],["leveldecor-for-level",[["rapidrouter/api/levels/%(pk)s/decors/",["pk"]]]],["levels",[["rapidrouter/",[]]]],["load_level_for_editor",[["rapidrouter/level_editor/get/%(levelID)s/",["levelID"]]]],["load_list_of_workspaces",[["rapidrouter/workspace/load_list/",[]]]],["load_workspace",[["rapidrouter/workspace/load/%(workspaceID)s/",["workspaceID"]]]],["load_workspace_solution",[["rapidrouter/workspace/solution/%(level_name)s/",["level_name"]]]],["locked_out",[["locked_out/",[]]]],["logout_view",[["logout/",[]]]],["map-for-level",[["rapidrouter/api/levels/%(pk)s/map/",["pk"]]]],["map-list",[["rapidrouter/api/maps/",[]]]],["mode-for-level",[["rapidrouter/api/levels/%(pk)s/mode/",["pk"]]]],["number_users_per_country",[["api/userspercountry/%(country)s/",["country"]]]],["old_login_form",[["login_form",[]]]],["onboarding-class",[["teach/onboarding-class/%(access_code)s",["access_code"]]]],["onboarding-classes",[["teach/onboarding-classes",[]]]],["onboarding-organisation",[["teach/onboarding-organisation/",[]]]],["organisation_kick",[["teach/dashboard/kick/%(pk)s/",["pk"]]]],["organisation_leave",[["teach/dashboard/school/leave/",[]]]],["organisation_toggle_admin",[["teach/dashboard/toggle_admin/%(pk)s/",["pk"]]]],["owned_levels",[["rapidrouter/level_editor/levels/owned/",[]]]],["password_reset_check_and_confirm",[["user/password/reset/%(uidb64)s-%(token)s/",["uidb64","token"]]]],["password_reset_complete",[["teacher/password/reset/complete/",[]]]],["play",[["play/",[]]]],["play_anonymous_level",[["rapidrouter/level_editor/play_anonymous/%(levelId)s/",["levelId"]]]],["play_custom_level",[["rapidrouter/custom/%(levelId)s/",["levelId"]]]],["play_custom_level_from_editor",[["rapidrouter/level_editor/play_custom/%(levelId)s/",["levelId"]]]],["play_default_level",[["rapidrouter/%(levelName)s/",["levelName"]],["%(levelName)s/",["levelName"]]]],["privacy_notice",[["privacy-notice/",[]]]],["privacy_policy",[["privacy-policy/",[]]]],["process_newsletter_form",[["news_signup/",[]]]],["random_level_for_episode",[["rapidrouter/levels/random/%(_0)s/",["_0"]]]],["rapid-router/javascript-catalog",[["rapidrouter/js-i18n/",[]]]],["register",[["register_form",[]]]],["registered-users",[["api/registered/%(year)s/%(month)s/%(day)s/",["year","month","day"]]]],["remove_fake_accounts",[["removeFakeAccounts/",[]]]],["resend_invite_teacher",[["teach/dashboard/resend_invite/%(token)s/",["token"]]]],["reset_password_email_sent",[["user/password/reset/done/",[]]]],["reset_screentime_warning",[["user/reset_screentime_warning/",[]]]],["reset_session_time",[["user/reset_session_time/",[]]]],["rest_framework:login",[["rapidrouter/api-auth/login/",[]]]],["rest_framework:logout",[["rapidrouter/api-auth/logout/",[]]]],["save_level_for_editor",[["rapidrouter/level_editor/save/%(levelId)s/",["levelId"]],["rapidrouter/level_editor/save/",[]]]],["save_workspace",[["rapidrouter/workspace/save/%(workspaceID)s/",["workspaceID"]],["rapidrouter/workspace/save/",[]]]],["school_student_edit_account",[["play/account/school_student/",[]]]],["scoreboard",[["rapidrouter/scoreboard/",[]]]],["second-verify-email-reminder",[["cron/user/unverified/send-second-reminder/",[]]]],["send_new_users_report",[["mail/weekly/",[]]]],["set_language",[["i18n/setlang/",[]]]],["share_level_for_editor",[["rapidrouter/level_editor/share/%(levelID)s/",["levelID"]]]],["shared_levels",[["rapidrouter/level_editor/levels/shared/",[]]]],["start_episode",[["rapidrouter/episode/%(episodeId)s/",["episodeId"]]]],["student_aimmo_dashboard",[["play/kurono/dashboard/",[]]]],["student_details",[["play/details/",[]]]],["student_direct_login",[["u/%(user_id)s/%(login_id)s/",["user_id","login_id"]]]],["student_edit_account",[["play/account/",[]]]],["student_join_organisation",[["play/join/",[]]]],["student_login",[["login/student/%(access_code)s/",["access_code"]],["login/student/%(access_code)s/%(login_type)s/",["access_code","login_type"]]]],["student_login_access_code",[["login/student/",[]]]],["student_password_reset",[["user/password/reset/student/",[]]]],["submit_attempt",[["rapidrouter/submit/",[]]]],["teach",[["teach/",[]]]],["teacher_accept_student_request",[["teach/dashboard/student/accept/%(pk)s/",["pk"]]]],["teacher_aimmo_dashboard",[["teach/kurono/dashboard/",[]]]],["teacher_class_password_reset",[["teach/class/%(access_code)s/password_reset/",["access_code"]]]],["teacher_delete_class",[["teach/class/delete/%(access_code)s",["access_code"]]]],["teacher_delete_students",[["teach/class/%(access_code)s/students/delete/",["access_code"]]]],["teacher_disable_2FA",[["teach/dashboard/disable_2FA/%(pk)s/",["pk"]]]],["teacher_dismiss_students",[["teach/class/%(access_code)s/students/dismiss/",["access_code"]]]],["teacher_download_csv",[["teach/onboarding-class/%(access_code)s/download_csv/",["access_code"]]]],["teacher_edit_class",[["teach/class/edit/%(access_code)s",["access_code"]]]],["teacher_edit_student",[["teach/class/student/edit/%(pk)s/",["pk"]]]],["teacher_login",[["login/teacher/",[]]]],["teacher_move_students",[["teach/class/%(access_code)s/students/move/",["access_code"]]]],["teacher_move_students_to_class",[["teach/class/%(access_code)s/students/move/disambiguate/",["access_code"]]]],["teacher_password_reset",[["user/password/reset/teacher/",[]]]],["teacher_print_reminder_cards",[["teach/onboarding-class/%(access_code)s/print_reminder_cards/",["access_code"]]]],["teacher_reject_student_request",[["teach/dashboard/student/reject/%(pk)s/",["pk"]]]],["terms",[["terms",[]]]],["theme-detail",[["rapidrouter/api/themes/%(pk)s/",["pk"]]]],["theme-list",[["rapidrouter/api/themes/",[]]]],["two_factor:backup_tokens",[["account/two_factor/backup/tokens/",[]]]],["two_factor:disable",[["account/two_factor/disable/",[]]]],["two_factor:profile",[["account/two_factor/",[]]]],["two_factor:qr",[["account/two_factor/qrcode/",[]]]],["two_factor:setup",[["account/two_factor/setup/",[]]]],["two_factor:setup_complete",[["account/two_factor/setup/complete/",[]]]],["verify_email",[["verify_email/%(token)s/",["token"]]]],["versions",[["versions/",[]]]],["view_class",[["teach/class/%(access_code)s",["access_code"]]]]],"prefix":"/"};function factory(d){var url_patterns=d.urls;var url_prefix=d.prefix;var Urls={};var self_url_patterns={};var _get_url=function(url_pattern){return function(){var _arguments,index,url,url_arg,url_args,_i,_len,_ref,_ref_list,match_ref,provided_keys,build_kwargs;_arguments=arguments;_ref_list=self_url_patterns[url_pattern];if(arguments.length==1&&typeof(arguments[0])=="object"){var provided_keys_list=Object.keys(arguments[0]);provided_keys={};for(_i=0;_i<provided_keys_list.length;_i++)
|
|
2
|
-
provided_keys[provided_keys_list[_i]]=1;match_ref=function(ref)
|
|
3
|
-
{var _i;if(ref[1].length!=provided_keys_list.length)
|
|
4
|
-
return false;for(_i=0;_i<ref[1].length&&ref[1][_i]in provided_keys;_i++);return _i==ref[1].length;}
|
|
5
|
-
build_kwargs=function(keys){return _arguments[0];}}else{match_ref=function(ref)
|
|
6
|
-
{return ref[1].length==_arguments.length;}
|
|
7
|
-
build_kwargs=function(keys){var kwargs={};for(var i=0;i<keys.length;i++){kwargs[keys[i]]=_arguments[i];}
|
|
8
|
-
return kwargs;}}
|
|
9
|
-
for(_i=0;_i<_ref_list.length&&!match_ref(_ref_list[_i]);_i++);if(_i==_ref_list.length)
|
|
10
|
-
return null;_ref=_ref_list[_i];url=_ref[0],url_args=build_kwargs(_ref[1]);for(url_arg in url_args){var url_arg_value=url_args[url_arg];if(url_arg_value===undefined||url_arg_value===null){url_arg_value='';}else{url_arg_value=url_arg_value.toString();}
|
|
11
|
-
url=url.replace("%("+url_arg+")s",url_arg_value);}
|
|
12
|
-
return url_prefix+url;};};var name,pattern,url,_i,_len,_ref;for(_i=0,_len=url_patterns.length;_i<_len;_i++){_ref=url_patterns[_i],name=_ref[0],pattern=_ref[1];self_url_patterns[name]=pattern;url=_get_url(name);Urls[name.replace(/[-_]+(.)/g,function(_m,p1){return p1.toUpperCase();})]=url;Urls[name.replace(/-/g,'_')]=url;Urls[name]=url;}
|
|
13
|
-
return Urls;}
|
|
14
|
-
return data?factory(data):factory;})();
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* ParamQuery Select v1.3.0
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2015 Paramvir Dhindsa (http://paramquery.com)
|
|
5
|
-
* Released under GNU General Public License v3
|
|
6
|
-
* http://paramquery.com/license
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
!function(a){"function"==typeof define&&define.amd?define(["jquery","jui/core","jui/widget","jui/position"],a):a(jQuery)}(function(a){"use strict";a.support.touch="ontouchend"in document;var b={};b.options=function(){var b=a.ui.keyCode;return{radio:!1,singlePlaceholder:"Select an option",checkbox:!1,displayText:"{0} of {1} selected",maxDisplay:4,maxSelect:0,multiplePlaceholder:"Select options",selectallText:"Select All",closeOnWindowScroll:!0,closeOnWindowResize:!0,itemCls:"pq-select-item ui-corner-all ui-state-default",bootstrap:{on:!1,btn:"btn btn-default",popupCont:"panel panel-default",selectCls:"label label-info",itemCls:"label label-default",closeIcon:"glyphicon glyphicon-remove",searchIcon:"glyphicon glyphicon-search",hoverCls:""},position:{my:"left top",at:"left bottom",collision:"flipfit"},kcOpen:[b.DOWN,b.ENTER,b.UP],deselect:!0,hoverCls:"pq-state-hover",search:!0,searchRule:"contain",_selectCls:"pq-state-select",selectCls:"ui-state-highlight",width:null,maxSelectReach:null,maxSelectExceed:null}}(),b._setButtonWidth=function(){var a=this.element;a.show();var b=this.options,c=b.width?b.width:a[0].offsetWidth;a.hide(),this.$button.width(c)},b._create=function(){var b=this,c=this.options,d=c.bootstrap,e=d.on,f=this.element,g=f.attr("name"),h=f.attr("multiple"),i=a(["<div class='pq-select-button pq-no-capture ui-widget ui-state-default ui-corner-all ",e?d.btn:"","' "," data-name='",g,"' tabindex='0'>",h?"":"<span class='ui-icon ui-icon-triangle-1-s"+(e?" caret":"")+"'></span>","<div class='pq-select-text'></div>","</div>"].join(""));e&&(c.selectCls+=" "+d.selectCls,c.itemCls+=" "+d.itemCls),this.$button=i,this.multiple=h?!0:!1,this.selector="label.pq-select-option-label.ui-state-enable:visible",this._setButtonWidth(),f.after(i),i.attr("name",g),i.addClass(f.attr("class")),f.addClass("pq-select"),this._extractData(),this._createPopup(),this._createMenu(),i.on({click:function(){if(!c.disabled){var d=a(this).parent(".pq-select-item"),e=parseInt(d.attr("data-id"));return b.select(e,!1),b.setText(),b.focus(),b.triggerChange(),!1}}},".ui-icon-close"),i.on({click:function(){return c.disabled?void 0:(b.toggle(),!1)},focus:function(){c.disabled||a(this).addClass("ui-state-hover")},blur:function(){a(this).removeClass("ui-state-hover")},mousedown:function(){c.disabled||a(this).addClass("ui-state-active")},mouseup:function(){c.disabled||a(this).removeClass("ui-state-active")},keydown:function(d){if(!c.disabled){var e=d.keyCode,f=c.kcOpen,g=a.ui.keyCode;-1!==a.inArray(e,f)?b.open():e===g.ESCAPE?b.close():e===g.SPACE&&b.toggle()}}}),this.setText();var j=this.eventNamespace;a(window).on("resize"+j,function(a){b.onWindowResize(a)}),a(window).on("scroll"+j,function(a){b.onWindowScroll(a)})},b.onWindowResize=function(){this.options.closeOnWindowResize&&this.close()},b.onWindowScroll=function(){this.options.closeOnWindowScroll&&this.close()},b.focus=function(){var b=this;a.support.touch||b.$search.focus()},a.paramquery=a.paramquery||{},a.paramquery.scrollView=function(b){var c=b[0],d=c.offsetTop,e=c.offsetHeight,f=c.offsetParent,g=f.scrollTop,h=f.clientHeight;e+d>h+g?a(f).scrollTop(e+d-h):g>d&&a(f).scrollTop(d)},a.paramquery.pageMove=function(b,c,d){var e,f=b[0].offsetHeight,g=b[0].offsetParent,h=g.clientHeight;do{if(e=b[d?"nextAll":"prevAll"](c),!e.length)break;e=a(e[0]),f+=e[0].offsetHeight,b=e}while(h>f);return a.paramquery.scrollView(b),b},b._move=function(b){var c=this.$lastlabelHighlight;if(c&&c.length){var d=c[b?"nextAll":"prevAll"](this.selector);d.length&&(d=a(d[0]),this._highlight(d))}else this._hightlight()},b._onkeydown=function(b){var c=b.keyCode,d=a.ui.keyCode;if(c===d.DOWN||c===d.UP)return this._move(c===d.DOWN),!1;if(c===d.PAGE_DOWN||c===d.PAGE_UP){var e=a.paramquery.pageMove(this.$lastlabelHighlight,this.selector,c===d.PAGE_DOWN);return this._highlight(e),!1}if(c===d.TAB)return this.close(),!1;if(c===d.ESCAPE)this.close();else if(c===d.ENTER&&this.$lastlabelHighlight)return this.$lastlabelHighlight.trigger("label_changed"),!1},b.search=function(a){for(var b=this.data,c=this.options.searchRule,d="contain"===c,e=0,f=b.length;f>e;e++){var g=b[e],h=g.text.toUpperCase(),i=h.indexOf(a);g.searchIndx=null,-1===i?g.hidden=!0:d===!1&&i>0?g.hidden=!0:(g.hidden=!1,g.searchIndx=i)}},b._onkeyupsearch=function(b){var c=a(b.target),d=a.trim(c.val()).toUpperCase(),e=(this.data,b.keyCode),f=a.ui.keyCode,g=[f.DOWN,f.UP,f.ENTER,f.PAGE_DOWN,f.PAGE_UP];-1===a.inArray(e,g)&&(this.search(d),this._createMenu(),this.positionPopup())},b._onChange=function(a,b){var c=this,d=c.options,e=this.multiple,f=d.maxSelect,g=c.selectIndx;if(e){if(b&&f&&g.length>=f)return c._trigger("maxSelectExceed",null,{option:c.$options[a]}),c.focus(),!1}else if(g.length){var h=g[0];if(a===h)return!1;b&&this.select(h,!1)}this.select(a,b),c.setText(),c.setSelectAllState(),e?f&&g.length>=f?c._trigger("maxSelectReach",null,{option:c.$options[a]})!==!1&&c.close():c.focus():c.close(),this.triggerChange()},b.setSelectAllState=function(){var a=this.$popup.find(".pq-select-all input");if(a.length){for(var b=this.data,c=0,d=0,e=0,f=b.length;f>e;e++){var g=b[e],h=g.selected,i=g.disabled;i||(c++,h&&d++)}c===d?a.prop("checked",!0):a.prop("checked",!1)}},b.getInstance=function(){return{select:this}},b.select=function(b,c){var d=this,e=d.selectIndx,f=this.options,g=this.data[b],h=a(d.$options[b]),i=d.$popup.find("#pq-option-"+this.uuid+"-"+b),j=i.find("input");if(i[c?"addClass":"removeClass"](f._selectCls+" "+f.selectCls),j.prop("checked",c),g.selected=c,d.multiple){if(c)e.push(b);else{var k=a.inArray(b,e);e.splice(k,1)}h.prop("selected",c)}else c?(e.length&&(this.data[e[0]].selected=!1),e[0]=b,h.prop("selected",c)):(d.selectIndx=[0],this.data[0].selected=!0,a(d.$options[0]).prop("selected",!0))},b.triggerChange=function(){this.element.trigger("change")},b._extractData=function(){var b,c=this.data=[],d=this.element,e=d.find("option,optgroup"),f=!1,g=!1;this.$options=d.find("option");for(var h=0,i=e.length;i>h;h++){var j=e[h],k=a(j);if("optgroup"!=j.nodeName.toLowerCase()){var l=k.prop("selected"),m=k.prop("disabled");!m&&f&&(m=g);var n=k.html();c.push({selected:l,disabled:m,text:n,optgroup:b})}else b=k.attr("label"),f=!0,g=k.prop("disabled")}this.grouping=f},b.refresh=function(){this.search(""),this._setButtonWidth(),this._createPopup(),this._createMenu(),this.setText()},b.refreshData=function(){this._extractData(),this.refresh()},b._createPopup=function(){var b=this,c=(this.data,this.options),d=c.bootstrap,e=d.on,f=b.multiple,g="",h="";f&&c.selectallText&&!c.maxSelect&&(h=["<label class='pq-select-all ui-widget-header ui-corner-all'>","<span class='ui-icon ui-icon-close ",e?d.closeIcon:"","'></span>","<input type='checkbox' >",c.selectallText,"</label>"].join("")),c.search&&(g=["<div class='pq-select-search-div ui-corner-all'>","<span class='ui-icon ui-icon-search ",e?d.searchIcon:"","' />","<div class='pq-select-search-div1'>","<input type='text' class='pq-select-search-input' autocomplete='off' />","</div>","</div>"].join(""));var i=a(["<div class='pq-select-popup-cont ",e?d.popupCont:"","'>","<div class='pq-select-popup ui-widget-content ui-corner-all'>",h,g,"</div><div class='pq-select-shadow-fix'></div></div>"].join(""));i.css({"font-family":this.$button.css("font-family"),"font-size":this.$button.css("font-size")});var j=i.children("div.pq-select-popup");j.on({keydown:function(a){return b._onkeydown(a)}}),j.find(".ui-icon-close").on({click:function(){return b.close(),!1}}),j.on({change:function(){for(var c=(b.element,a(this)),d=c.prop("checked")?!0:!1,e=b.data,f=b.$options,g=0;g<e.length;g++){var h=e[g];h.disabled||h.selected===d||(h.selected=d,a(f[g]).prop("selected",d))}b._createMenu(),b.setText(),b.focus(),b.triggerChange()}},"label.pq-select-all input"),j.on({mouseenter:function(){b._highlight(a(this))},label_changed:function(){var d=a(this),e=d.attr("id");if(e){var f=!d.hasClass(c._selectCls),g=parseInt(e.split("-")[3]);return b._onChange(g,f)}}},"label.pq-select-option-label.ui-state-enable"),f&&c.checkbox||!f&&c.radio?j.on({click:function(){var b=a(this).closest("label");b.trigger("label_changed")}},"label.pq-select-option-label.ui-state-enable input"):j.on({click:function(){a(this).trigger("label_changed")}},"label.pq-select-option-label.ui-state-enable"),this.$popupCont&&this.$popupCont.remove(),this.$popupCont=i,this.$popup=j,this.$search=j.find(".pq-select-search-input").on({keyup:function(a){return b._onkeyupsearch(a)}}),a(document.body).append(i),this.setSelectAllState()},b._createMenu=function(){for(var b,c,d,e,f=this,g=this.data,h=this.uuid,i=this.options,j=i.search?a.trim(this.$search.val()).length:0,k=" "+i._selectCls+" "+i.selectCls+" ",l=f.multiple,m=l?i.checkbox?'type="checkbox"':"":i.radio?'type="radio"':"",n=m?"pq-left-input":this.grouping?"pq-left-group":"",o=f.selectIndx=[],p=[],q=0;q<g.length;q++){var r=g[q],c=r.disabled,s=r.selected,t=r.text,u=r.optgroup;if(s&&o.push(q),!r.hidden){e!==u&&(p.push("<div class='pq-select-optgroup'>",u,"</div>"),e=u);var v=s?' checked="checked" ':"",w=s?k:"",x=c?' disabled="disabled" ':"",d=c?"ui-state-disabled":"ui-state-enable",y="";(0!==q||""!==t)&&(j&&(b=r.searchIndx,t=t.substr(0,b)+"<span class='pq-select-search-highlight'>"+t.substr(b,j)+"</span>"+t.substr(b+j,t.length)),p.push("<label class='pq-select-option-label ",w,d,"'",y," id='pq-option-",h,"-",q,"'>",m?"<input "+m+" "+v+x+" >":"","<span class='",n,"'>",t,"</span>","</label>"))}}var z=a(["<div class='pq-select-menu' >",p.join(""),"</div>"].join(""));this.$menu&&this.$menu.remove(),this.$popup.append(z),delete this.$lastlabelHighlight,this.$menu=z,this._highlight()},b._highlight=function(b){var c=this.options.hoverCls;b&&b.length||(b=this.$menu.find("label.pq-select-option-label.ui-state-enable:visible:first")),b.length&&(this.$lastlabelHighlight&&this.$lastlabelHighlight.removeClass(c),b.addClass(c),this.$lastlabelHighlight=b,a.paramquery.scrollView(b))},b._setPopupWidth=function(){var a=this.$button[0].offsetWidth;this.$popupCont.width(a)},b.positionPopup=function(){var b=this.options,c=this.$button,d=a.extend({of:c},b.position),e=this.$popupCont;this._setPopupWidth(),e.position(d)},b.isOpen=function(){return this.$popupCont&&"block"==this.$popupCont.css("display")?!0:!1},b.open=function(){{var b=this,c=this.$popupCont;this.$menu,this.selectIndx}return this.isOpen()?!1:(c.show(),this.positionPopup(),this._highlight(),a(document).on("mousedown"+b.eventNamespace,function(c){var d=a(c.target);d.closest(b.$popup).length||d.closest(b.$button).length||b.close()}),void(this.options.search?b.focus():c.attr("tabindex","-1").focus()))},b.setText=function(){var a,b=this.$button,c=b.find(".pq-select-text"),d=this.element,e=this.options,f=e.deselect,g=this.data,h=e.itemCls,i=e.bootstrap,j=i.on?i.closeIcon:"",k=function(a){return f?["<span class='",h,"' data-id = '",a,"'>","<span class='ui-icon ui-icon-close ",j,"'></span>","<span class='pq-select-item-text'>",g[a].text,"</span>","</span>"].join(""):g[a].text},l=this.selectIndx;if(this.multiple){b.addClass("pq-select-multiple");var m=l.length,n=e.maxDisplay,o=g.length;if(m>0)if(n>=m){for(var p=[],q=0;m>q;q++){var r=l[q];p.push(k(r))}a=p.join(f?"":", ")}else a=e.displayText,a=a.replace("{0}",l.length),a=a.replace("{1}",o);else a=d.attr("data-placeholder"),a||(a=e.multiplePlaceholder)}else{b.addClass("pq-select-single"),c.css("maxWidth",b.width()-16);var r=l[0],a=r>=0?g[r].text:"";null!=a&&""!==a?a=k(r):(a=d.attr("data-placeholder"),a||(a=e.singlePlaceholder))}c.html(a),this.multiple||c.find(".pq-select-item-text").css({maxWidth:b.width()-35}),this.positionPopup()},b.close=function(b){this.isOpen()&&(b=b||{},b.focus!==!1&&this.$button.focus(),this.$popupCont.hide()),a(document).off(this.eventNamespace)},b.toggle=function(){this.isOpen()?this.close():this.open()},b.disable=function(){this.option({disabled:!0})},b.enable=function(){this.option({disabled:!1})},b._destroy=function(){this.$popupCont.remove(),this.$button.remove(),this.element.removeClass("pq-select").show();var b=this.eventNamespace;a(document).off(b),a(window).off(b)},b.destroy=function(){this._super();for(var a in this)delete this[a]},b._setOption=function(a,b){"disabled"==a&&(b===!0?(this.close(),this.$button.addClass("ui-state-disabled")):b===!1&&this.$button.removeClass("ui-state-disabled")),this._super(a,b)},a.widget("paramquery.pqSelect",b)});
|