From 2de08a64e959788f288d82cd4410fee9424a11bc Mon Sep 17 00:00:00 2001 From: liamfallon Date: Thu, 16 Jul 2020 10:24:08 +0100 Subject: Move apex policy editor to policy-gui This review moves the code for the apex policy editor from the apex repo to the GUI repo. The docker part of the build will be moved in the next review because it is intertwined with the other two legacy apex GUIs and needs to be disentangled. Subsequent reviews on the apex repo will remove this code from there. Issue-ID: POLICY-2621 Change-Id: Ib9a43f463b839201656208a48ab48869a19f963a Signed-off-by: liamfallon --- .../src/main/resources/webapp/WEB-INF/web.xml | 43 + .../src/main/resources/webapp/close.html | 45 + .../src/main/resources/webapp/css/close.css | 48 + .../src/main/resources/webapp/css/contextMenu.css | 111 + .../src/main/resources/webapp/css/dropdownList.css | 134 + .../src/main/resources/webapp/css/fileMenu.css | 195 + .../main/resources/webapp/css/interfaceAssets.css | 2808 +++ .../main/resources/webapp/css/showhideTextarea.css | 134 + .../src/main/resources/webapp/css/styles.css | 556 + .../src/main/resources/webapp/images/Apex.png | Bin 0 -> 161205 bytes .../src/main/resources/webapp/images/logo_onap.png | Bin 0 -> 21360 bytes .../src/main/resources/webapp/index.html | 240 + .../src/main/resources/webapp/js/ApexAjax.js | 123 + .../webapp/js/ApexContextAlbumEditForm.js | 475 + .../resources/webapp/js/ApexContextAlbumTab.js | 116 + .../webapp/js/ApexContextSchemaEditForm.js | 369 + .../resources/webapp/js/ApexContextSchemaTab.js | 105 + .../main/resources/webapp/js/ApexEventEditForm.js | 566 + .../src/main/resources/webapp/js/ApexEventTab.js | 139 + .../src/main/resources/webapp/js/ApexFiles.js | 51 + .../src/main/resources/webapp/js/ApexFormUtils.js | 48 + .../resources/webapp/js/ApexKeyInformationTab.js | 105 + .../src/main/resources/webapp/js/ApexMain.js | 169 + .../main/resources/webapp/js/ApexModelHandling.js | 40 + .../main/resources/webapp/js/ApexNewModelForm.js | 227 + .../main/resources/webapp/js/ApexPageControl.js | 253 + .../main/resources/webapp/js/ApexPolicyEditForm.js | 802 + .../webapp/js/ApexPolicyEditForm_State.js | 1129 ++ .../src/main/resources/webapp/js/ApexPolicyTab.js | 211 + .../src/main/resources/webapp/js/ApexResultForm.js | 89 + .../src/main/resources/webapp/js/ApexTable.js | 37 + .../main/resources/webapp/js/ApexTaskEditForm.js | 1003 + .../src/main/resources/webapp/js/ApexTaskTab.js | 176 + .../src/main/resources/webapp/js/ApexUtils.js | 127 + .../src/main/resources/webapp/js/contextMenu.js | 199 + .../src/main/resources/webapp/js/dropdownList.js | 201 + .../webapp/js/edit_area/edit_area_full.js | 1235 ++ .../webapp/js/edit_area/images/autocompletion.gif | Bin 0 -> 359 bytes .../resources/webapp/js/edit_area/images/close.gif | Bin 0 -> 102 bytes .../webapp/js/edit_area/images/fullscreen.gif | Bin 0 -> 198 bytes .../webapp/js/edit_area/images/go_to_line.gif | Bin 0 -> 1053 bytes .../resources/webapp/js/edit_area/images/help.gif | Bin 0 -> 295 bytes .../webapp/js/edit_area/images/highlight.gif | Bin 0 -> 256 bytes .../resources/webapp/js/edit_area/images/load.gif | Bin 0 -> 1041 bytes .../resources/webapp/js/edit_area/images/move.gif | Bin 0 -> 257 bytes .../webapp/js/edit_area/images/newdocument.gif | Bin 0 -> 170 bytes .../webapp/js/edit_area/images/opacity.png | Bin 0 -> 147 bytes .../webapp/js/edit_area/images/processing.gif | Bin 0 -> 825 bytes .../resources/webapp/js/edit_area/images/redo.gif | Bin 0 -> 169 bytes .../webapp/js/edit_area/images/reset_highlight.gif | Bin 0 -> 168 bytes .../resources/webapp/js/edit_area/images/save.gif | Bin 0 -> 285 bytes .../webapp/js/edit_area/images/search.gif | Bin 0 -> 191 bytes .../js/edit_area/images/smooth_selection.gif | Bin 0 -> 174 bytes .../webapp/js/edit_area/images/spacer.gif | Bin 0 -> 43 bytes .../js/edit_area/images/statusbar_resize.gif | Bin 0 -> 79 bytes .../resources/webapp/js/edit_area/images/undo.gif | Bin 0 -> 175 bytes .../webapp/js/edit_area/images/word_wrap.gif | Bin 0 -> 951 bytes .../main/resources/webapp/js/edit_area/langs/bg.js | 54 + .../main/resources/webapp/js/edit_area/langs/cs.js | 48 + .../main/resources/webapp/js/edit_area/langs/de.js | 48 + .../main/resources/webapp/js/edit_area/langs/dk.js | 48 + .../main/resources/webapp/js/edit_area/langs/en.js | 48 + .../main/resources/webapp/js/edit_area/langs/eo.js | 48 + .../main/resources/webapp/js/edit_area/langs/es.js | 48 + .../main/resources/webapp/js/edit_area/langs/fi.js | 48 + .../main/resources/webapp/js/edit_area/langs/fr.js | 48 + .../main/resources/webapp/js/edit_area/langs/hr.js | 48 + .../main/resources/webapp/js/edit_area/langs/it.js | 48 + .../main/resources/webapp/js/edit_area/langs/ja.js | 48 + .../main/resources/webapp/js/edit_area/langs/mk.js | 48 + .../main/resources/webapp/js/edit_area/langs/nl.js | 48 + .../main/resources/webapp/js/edit_area/langs/pl.js | 48 + .../main/resources/webapp/js/edit_area/langs/pt.js | 48 + .../main/resources/webapp/js/edit_area/langs/ru.js | 48 + .../main/resources/webapp/js/edit_area/langs/sk.js | 48 + .../main/resources/webapp/js/edit_area/langs/zh.js | 48 + .../webapp/js/edit_area/license_apache.txt | 7 + .../webapp/js/edit_area/reg_syntax/basic.js | 70 + .../webapp/js/edit_area/reg_syntax/brainfuck.js | 45 + .../resources/webapp/js/edit_area/reg_syntax/c.js | 63 + .../webapp/js/edit_area/reg_syntax/coldfusion.js | 120 + .../webapp/js/edit_area/reg_syntax/cpp.js | 66 + .../webapp/js/edit_area/reg_syntax/css.js | 85 + .../webapp/js/edit_area/reg_syntax/html.js | 51 + .../webapp/js/edit_area/reg_syntax/java.js | 57 + .../resources/webapp/js/edit_area/reg_syntax/js.js | 94 + .../webapp/js/edit_area/reg_syntax/pas.js | 83 + .../webapp/js/edit_area/reg_syntax/perl.js | 88 + .../webapp/js/edit_area/reg_syntax/php.js | 157 + .../webapp/js/edit_area/reg_syntax/python.js | 145 + .../webapp/js/edit_area/reg_syntax/robotstxt.js | 25 + .../webapp/js/edit_area/reg_syntax/ruby.js | 68 + .../webapp/js/edit_area/reg_syntax/sql.js | 56 + .../webapp/js/edit_area/reg_syntax/tsql.js | 88 + .../resources/webapp/js/edit_area/reg_syntax/vb.js | 53 + .../webapp/js/edit_area/reg_syntax/xml.js | 57 + .../src/main/resources/webapp/js/fileMenu.js | 146 + .../webapp/js/jquery-ui-1.12.1/AUTHORS.txt | 337 + .../webapp/js/jquery-ui-1.12.1/LICENSE.txt | 43 + .../js/jquery-ui-1.12.1/external/jquery/jquery.js | 2 + .../images/ui-icons_444444_256x240.png | Bin 0 -> 7006 bytes .../images/ui-icons_555555_256x240.png | Bin 0 -> 7074 bytes .../images/ui-icons_777620_256x240.png | Bin 0 -> 4676 bytes .../images/ui-icons_777777_256x240.png | Bin 0 -> 7013 bytes .../images/ui-icons_cc0000_256x240.png | Bin 0 -> 4632 bytes .../images/ui-icons_ffffff_256x240.png | Bin 0 -> 6313 bytes .../webapp/js/jquery-ui-1.12.1/index.html | 565 + .../webapp/js/jquery-ui-1.12.1/jquery-ui.css | 1312 ++ .../webapp/js/jquery-ui-1.12.1/jquery-ui.js | 18706 +++++++++++++++++++ .../webapp/js/jquery-ui-1.12.1/jquery-ui.min.css | 7 + .../webapp/js/jquery-ui-1.12.1/jquery-ui.min.js | 13 + .../js/jquery-ui-1.12.1/jquery-ui.structure.css | 886 + .../jquery-ui-1.12.1/jquery-ui.structure.min.css | 5 + .../webapp/js/jquery-ui-1.12.1/jquery-ui.theme.css | 443 + .../js/jquery-ui-1.12.1/jquery-ui.theme.min.css | 5 + .../webapp/js/jquery-ui-1.12.1/package.json | 74 + .../main/resources/webapp/js/showhideElement.js | 61 + .../main/resources/webapp/js/showhideTextarea.js | 126 + .../10px/ArrowDoubleLeftSmall_black_10px.svg | 16 + .../10px/ArrowDoubleRightSmall_black_10px.svg | 16 + .../resources/10px/ArrowDownSmall_black_10px.svg | 14 + .../resources/10px/ArrowLeftSmall_black_10px.svg | 14 + .../resources/10px/ArrowRightSmall_black_10px.svg | 14 + .../resources/10px/ArrowUpSmall_black_10px.svg | 14 + .../16px/ArrowDoubleLeftSmall_black_16px.svg | 20 + .../16px/ArrowDoubleRightSmall_black_16px.svg | 20 + .../resources/16px/ArrowDownSmall_black_16px.svg | 17 + .../resources/16px/ArrowDownSmall_blue_16px.svg | 14 + .../resources/16px/ArrowDownSmall_white_16px.svg | 14 + .../webapp/resources/16px/ArrowDown_black_16px.svg | 18 + .../webapp/resources/16px/ArrowDown_blue_16px.svg | 14 + .../webapp/resources/16px/ArrowDown_white_16px.svg | 16 + .../resources/16px/ArrowLeftSmall_black_16px.svg | 17 + .../resources/16px/ArrowLeftSmall_white_16px.svg | 14 + .../webapp/resources/16px/ArrowLeft_black_16px.svg | 18 + .../webapp/resources/16px/ArrowLeft_white_16px.svg | 15 + .../resources/16px/ArrowRightSmall_black_16px.svg | 17 + .../resources/16px/ArrowRightSmall_white_16px.svg | 14 + .../resources/16px/ArrowRight_black_16px.svg | 18 + .../resources/16px/ArrowRight_white_16px.svg | 16 + .../resources/16px/ArrowUpSmall_black_16px.svg | 17 + .../webapp/resources/16px/ArrowUp_black_16px.svg | 17 + .../webapp/resources/16px/ArrowUp_white_16px.svg | 16 + .../resources/16px/BSCFunction_Yellow_16px.svg | 22 + .../resources/16px/BSCFunction_black_16px.svg | 22 + .../webapp/resources/16px/BSC_Yellow_16px.svg | 21 + .../webapp/resources/16px/BSC_black_16px.svg | 19 + .../webapp/resources/16px/Cancelled_Black_16px.svg | 7 + .../16px/CommandLineInterface_black_16px.svg | 14 + .../16px/CommandLineInterface_white_16px.svg | 14 + .../webapp/resources/16px/Comment_black_16px.svg | 13 + .../webapp/resources/16px/Link_black_16px.svg | 1 + .../webapp/resources/16px/RBS_black_16px.svg | 32 + .../webapp/resources/16px/RBS_white_16px.svg | 36 + .../webapp/resources/16px/SyncError_16px.svg | 22 + .../resources/webapp/resources/16px/Syncd_16px.svg | 24 + .../resources/16px/Syncing_Animated_16px.svg | 69 + .../webapp/resources/16px/Syncing_Static_16px.svg | 20 + .../resources/16px/WindowMaximize_black_16px.svg | 16 + .../resources/16px/WindowMinimize_black_16px.svg | 16 + .../webapp/resources/16px/X_black_16px.svg | 18 + .../webapp/resources/16px/X_blue_16px.svg | 9 + .../webapp/resources/16px/X_green_16px.svg | 18 + .../webapp/resources/16px/X_orange_16px.svg | 18 + .../webapp/resources/16px/X_paleBlue_16px.svg | 18 + .../resources/webapp/resources/16px/X_red_16px.svg | 18 + .../webapp/resources/16px/X_yellow_16px.svg | 18 + .../resources/16px/accessSettings_black_16px.svg | 31 + .../resources/16px/accessSettings_white_16px.svg | 26 + .../webapp/resources/16px/access_black_16px.svg | 12 + .../webapp/resources/16px/access_white_16px.svg | 15 + .../webapp/resources/16px/acknowledgeAlarm.svg | 13 + .../resources/16px/acknowledgeAlarm_white.svg | 1 + .../webapp/resources/16px/activate_black_16px.svg | 36 + .../webapp/resources/16px/activate_white.svg | 1 + .../webapp/resources/16px/activity_16px_black.svg | 20 + .../webapp/resources/16px/addToFolder_black.svg | 16 + .../webapp/resources/16px/addToFolder_white.svg | 1 + .../webapp/resources/16px/add_black_16px.svg | 55 + .../webapp/resources/16px/add_white_16px.svg | 11 + .../resources/16px/advanced_search_black_16px.svg | 15 + .../resources/16px/advanced_search_white_16px.svg | 20 + .../webapp/resources/16px/alarmCleared_16px.svg | 15 + .../resources/16px/alarmCleared_white_16px.svg | 12 + .../webapp/resources/16px/alarmCritical_16px.svg | 17 + .../resources/16px/alarmCritical_white_16px.svg | 14 + .../webapp/resources/16px/alarmHeartbeat_16px.svg | 16 + .../resources/16px/alarmIndeterminate_16px.svg | 16 + .../16px/alarmIndeterminate_white_16px.svg | 14 + .../webapp/resources/16px/alarmMajor_16px.svg | 17 + .../resources/16px/alarmMajor_white_16px.svg | 13 + .../webapp/resources/16px/alarmMinor_16px.svg | 17 + .../resources/16px/alarmMinor_white_16px.svg | 13 + .../resources/16px/alarmOtherGrouping_16px.svg | 25 + .../webapp/resources/16px/alarmUnacknowledged.svg | 18 + .../resources/16px/alarmUnacknowledged_white.svg | 1 + .../resources/16px/alarmUnspecified_16px.svg | 13 + .../webapp/resources/16px/alarmWarning_16px.svg | 11 + .../resources/16px/alarmWarning_white_16px.svg | 14 + .../resources/16px/alignCenter_black_16px.svg | 19 + .../webapp/resources/16px/alignCenter_white.svg | 1 + .../webapp/resources/16px/alignLeft_black_16px.svg | 19 + .../webapp/resources/16px/alignLeft_white.svg | 1 + .../resources/16px/alignRight_black_16px.svg | 19 + .../webapp/resources/16px/alignRight_white.svg | 1 + .../resources/16px/arrowUpSmall_white_16px.svg | 14 + .../webapp/resources/16px/attach_black_16px.svg | 11 + .../webapp/resources/16px/attach_white.svg | 1 + .../webapp/resources/16px/baseStation.svg | 35 + .../webapp/resources/16px/cabinet_black_16px.svg | 18 + .../webapp/resources/16px/calendar_black_16px.svg | 13 + .../webapp/resources/16px/calendar_white_16px.svg | 16 + .../webapp/resources/16px/cellAdjacent_16px.svg | 20 + .../webapp/resources/16px/cellExternal_16px.svg | 20 + .../webapp/resources/16px/cell_gray_16px.svg | 15 + .../webapp/resources/16px/cell_green_16px.svg | 15 + .../webapp/resources/16px/cell_red_16px.svg | 15 + .../webapp/resources/16px/charging_black.svg | 25 + .../webapp/resources/16px/charging_white.svg | 1 + .../resources/16px/circleArrowDown_black_16px.svg | 19 + .../resources/16px/circleArrowDown_white_16px.svg | 17 + .../resources/16px/circleArrowLeft_black_16px.svg | 19 + .../resources/16px/circleArrowLeft_white_16px.svg | 17 + .../resources/16px/circleArrowRight_black_16px.svg | 19 + .../resources/16px/circleArrowRight_white_16px.svg | 17 + .../resources/16px/circleArrowUp_black_16px.svg | 19 + .../resources/16px/circleArrowUp_white_16px.svg | 17 + .../resources/16px/circleCaretDown_black_16px.svg | 18 + .../resources/16px/circleCaretDown_white_16px.svg | 15 + .../resources/16px/circleCaretLeft_black_16px.svg | 18 + .../resources/16px/circleCaretLeft_white_16px.svg | 15 + .../resources/16px/circleCaretRight_black_16px.svg | 18 + .../resources/16px/circleCaretRight_white_16px.svg | 15 + .../resources/16px/circleCaretUp_black_16px.svg | 18 + .../resources/16px/circleCaretUp_white_16px.svg | 15 + .../resources/webapp/resources/16px/clearAlarm.svg | 34 + .../webapp/resources/16px/clearAlarm_white.svg | 1 + .../webapp/resources/16px/clock_black_16px.svg | 14 + .../webapp/resources/16px/clock_white_16px.svg | 14 + .../webapp/resources/16px/close_white_16px.svg | 15 + .../webapp/resources/16px/comment_white.svg | 1 + .../webapp/resources/16px/connected_black_16px.svg | 20 + .../resources/16px/connectionError_black_16px.svg | 31 + .../webapp/resources/16px/controllingNode.svg | 17 + .../webapp/resources/16px/copy_black_16px.svg | 22 + .../webapp/resources/16px/copy_white_16px.svg | 18 + .../resources/16px/coreSubscriber_black_16px.svg | 29 + .../webapp/resources/16px/core_black_16px.svg | 19 + .../resources/webapp/resources/16px/cut_black.svg | 35 + .../resources/webapp/resources/16px/cut_white.svg | 22 + .../webapp/resources/16px/database_black_16px.svg | 22 + .../resources/16px/deactivate_black_16px.svg | 34 + .../webapp/resources/16px/deactivate_white.svg | 1 + .../webapp/resources/16px/delete_black_16px.svg | 23 + .../webapp/resources/16px/delete_white_16px.svg | 20 + .../webapp/resources/16px/deprecated_16px.svg | 17 + .../webapp/resources/16px/detach_black_16px.svg | 12 + .../webapp/resources/16px/detach_white.svg | 1 + .../webapp/resources/16px/dialogInfo_blue.svg | 18 + .../webapp/resources/16px/dialogInfo_white.svg | 1 + .../resources/16px/disconnected_black_16px.svg | 26 + .../webapp/resources/16px/document_white_16px.svg | 17 + .../webapp/resources/16px/download_black.svg | 18 + .../webapp/resources/16px/download_white.svg | 10 + .../webapp/resources/16px/download_white_16px.svg | 16 + .../main/resources/webapp/resources/16px/draft.svg | 11 + .../webapp/resources/16px/duplicate_black_16px.svg | 19 + .../webapp/resources/16px/duplicate_white_16px.svg | 16 + .../webapp/resources/16px/edit_black_16px.svg | 22 + .../webapp/resources/16px/edit_white_16px.svg | 20 + .../webapp/resources/16px/error_red_16px.svg | 19 + .../webapp/resources/16px/expand_black_16px.svg | 18 + .../webapp/resources/16px/export_black_16px.svg | 19 + .../webapp/resources/16px/export_white.svg | 1 + .../resources/16px/externalApp_black_16px.svg | 15 + .../resources/16px/externalApp_white_16px.svg | 16 + .../webapp/resources/16px/eyeLine_black_16px.svg | 17 + .../webapp/resources/16px/eyeLine_white.svg | 1 + .../webapp/resources/16px/eye_black_16px.svg | 13 + .../webapp/resources/16px/eye_white_16px.svg | 13 + .../resources/16px/fastForward_black_16px.svg | 20 + .../resources/16px/fastRewind_black_16px.svg | 19 + .../webapp/resources/16px/filter_black_16px.svg | 19 + .../webapp/resources/16px/filter_white_16px.svg | 13 + .../webapp/resources/16px/filters_off.svg | 1 + .../resources/webapp/resources/16px/filters_on.svg | 1 + .../webapp/resources/16px/folderClosed_black.svg | 10 + .../webapp/resources/16px/folderClosed_white.svg | 17 + .../webapp/resources/16px/folder_black_16px.svg | 20 + .../webapp/resources/16px/folder_white_16px.svg | 16 + .../16px/ftpServerFunction_black_16px.svg | 31 + .../webapp/resources/16px/ftpServer_black_16px.svg | 18 + .../16px/fullscreenMinimise_black_16px.svg | 22 + .../resources/16px/fullscreen_black_16px.svg | 22 + .../resources/16px/gatewayFunction_black_16px.svg | 35 + .../resources/16px/grabHandle_black_16px.svg | 14 + .../webapp/resources/16px/grabHandle_white.svg | 13 + .../webapp/resources/16px/grid3X3_black_16px.svg | 38 + .../webapp/resources/16px/grid3x3_white.svg | 1 + .../webapp/resources/16px/grid4X4_black_16px.svg | 26 + .../webapp/resources/16px/grid4x4_white.svg | 1 + .../webapp/resources/16px/gridView_black_16px.svg | 26 + .../webapp/resources/16px/gridView_white.svg | 1 + .../webapp/resources/16px/help_black_16px.svg | 20 + .../resources/webapp/resources/16px/help_white.svg | 1 + .../webapp/resources/16px/import_black.svg | 19 + .../webapp/resources/16px/import_export.svg | 1 + .../webapp/resources/16px/import_white.svg | 1 + .../resources/16px/infoMsgIndicator_16px.svg | 167 + .../resources/webapp/resources/16px/info_black.svg | 27 + .../resources/webapp/resources/16px/info_white.svg | 1 + .../webapp/resources/16px/invalid_icon.svg | 16 + .../webapp/resources/16px/jumpTo_black_16px.svg | 17 + .../webapp/resources/16px/lock_black_16px.svg | 17 + .../webapp/resources/16px/lock_white_16px.svg | 14 + .../main/resources/webapp/resources/16px/login.svg | 1 + .../webapp/resources/16px/logout_black_16px.svg | 22 + .../webapp/resources/16px/mailRead_black_16px.svg | 22 + .../webapp/resources/16px/mailRead_white_16px.svg | 19 + .../webapp/resources/16px/mail_black_16px.svg | 22 + .../webapp/resources/16px/mail_white_16px.svg | 18 + .../resources/16px/managedFunction_black_16px.svg | 28 + .../resources/16px/managedGroup_black_16px.svg | 31 + .../resources/16px/managementNode_black_16px.svg | 34 + .../webapp/resources/16px/menu_black_16px.svg | 20 + .../webapp/resources/16px/menu_white_16px.svg | 20 + .../resources/webapp/resources/16px/microwave.svg | 28 + .../16px/minimiseFullscreen_black_16px.svg | 19 + .../webapp/resources/16px/minus_black_16px.svg | 15 + .../main/resources/webapp/resources/16px/mo.svg | 18 + .../main/resources/webapp/resources/16px/move.svg | 1 + .../resources/webapp/resources/16px/multi-sort.svg | 1 + .../webapp/resources/16px/multi-sort_white.svg | 1 + .../resources/16px/multiSelect_black_16px.svg | 24 + .../webapp/resources/16px/multiSelect_white.svg | 1 + .../resources/16px/networkElement_black_16px.svg | 19 + .../resources/16px/networkElement_white_16px.svg | 19 + .../webapp/resources/16px/network_black_16px.svg | 26 + .../webapp/resources/16px/newFile_black_16px.svg | 16 + .../webapp/resources/16px/newFile_white_16px.svg | 14 + .../webapp/resources/16px/newStatus_blue_16px.svg | 19 + .../webapp/resources/16px/newStatus_green_16px.svg | 19 + .../webapp/resources/16px/note_black_16px.svg | 17 + .../webapp/resources/16px/note_white_16px.svg | 1 + .../webapp/resources/16px/obsolete_16px.svg | 16 + .../webapp/resources/16px/pause_black_16px.svg | 12 + .../webapp/resources/16px/play_black_16px.svg | 9 + .../webapp/resources/16px/plus_black_16px.svg | 16 + .../webapp/resources/16px/print_black_16px.svg | 18 + .../webapp/resources/16px/print_white_16px.svg | 15 + .../webapp/resources/16px/refresh_black_16px.svg | 22 + .../webapp/resources/16px/refresh_white_16px.svg | 19 + .../resources/webapp/resources/16px/remove.svg | 1 + .../webapp/resources/16px/resume_black_16px.svg | 76 + .../webapp/resources/16px/routeSwitch.svg | 23 + .../resources/16px/rowCollapsed_black_16px.svg | 19 + .../resources/16px/rowExpanded_black_16px.svg | 18 + .../webapp/resources/16px/rowView_black_16px.svg | 29 + .../webapp/resources/16px/rowView_white.svg | 1 + .../webapp/resources/16px/rxi_black_16px.svg | 26 + .../webapp/resources/16px/save_black_16px.svg | 21 + .../resources/webapp/resources/16px/save_white.svg | 1 + .../webapp/resources/16px/search_black_16px.svg | 20 + .../webapp/resources/16px/search_white_16px.svg | 17 + .../webapp/resources/16px/security_black_16px.svg | 26 + .../webapp/resources/16px/security_white_16px.svg | 19 + .../webapp/resources/16px/settings_black_16px.svg | 20 + .../webapp/resources/16px/settings_white_16px.svg | 22 + .../webapp/resources/16px/share_black_16px.svg | 19 + .../webapp/resources/16px/share_white.svg | 1 + .../webapp/resources/16px/simple_green_tick.svg | 13 + .../webapp/resources/16px/simple_tick.svg | 13 + .../resources/16px/siteManager_black_16px.svg | 29 + .../webapp/resources/16px/site_black_16px.svg | 23 + .../main/resources/webapp/resources/16px/sort.svg | 1 + .../resources/webapp/resources/16px/sort_white.svg | 1 + .../webapp/resources/16px/star_black_16px.svg | 14 + .../resources/16px/star_outline_black_16px.svg | 9 + .../resources/16px/star_outline_white_16px.svg | 9 + .../resources/16px/star_outline_yellow_16px.svg | 9 + .../webapp/resources/16px/star_white_16px.svg | 14 + .../webapp/resources/16px/star_yellow_16px.svg | 11 + .../webapp/resources/16px/stop_black_16px.svg | 9 + .../resources/webapp/resources/16px/subnetwork.svg | 24 + .../webapp/resources/16px/suspend_black_16px.svg | 150 + .../resources/webapp/resources/16px/switch.svg | 26 + .../resources/16px/switchBetween_black_16px.svg | 1 + .../resources/16px/switchBetween_white_16px.svg | 166 + .../resources/16px/switchFunction_black_16px.svg | 33 + .../webapp/resources/16px/tableView_black_16px.svg | 1 + .../webapp/resources/16px/tableView_white_16px.svg | 1 + .../resources/16px/technicianPresent_16px.svg | 20 + .../webapp/resources/16px/terminal_black_16px.svg | 11 + .../resources/webapp/resources/16px/tick_16px.svg | 18 + .../webapp/resources/16px/tick_green_16px.svg | 18 + .../webapp/resources/16px/tip_black_16px.svg | 47 + .../webapp/resources/16px/tip_white_16px.svg | 37 + .../webapp/resources/16px/topology_black_16px.svg | 19 + .../webapp/resources/16px/undo_black_16px.svg | 14 + .../webapp/resources/16px/undo_white_16px.svg | 15 + .../webapp/resources/16px/unlock_black_16px.svg | 17 + .../webapp/resources/16px/unlock_white_16px.svg | 14 + .../webapp/resources/16px/upload_black_16px.svg | 16 + .../webapp/resources/16px/user_black_16px.svg | 21 + .../webapp/resources/16px/user_white_16px.svg | 21 + .../resources/webapp/resources/16px/valid_icon.svg | 16 + .../resources/16px/warningShield_black_16px.svg | 19 + .../webapp/resources/16px/warningShield_white.svg | 1 + .../webapp/resources/16px/warning_orange_16px.svg | 21 + .../webapp/resources/16px/warning_white.svg | 16 + .../webapp/resources/16px/warning_yellow_16px.svg | 17 + .../webapp/resources/28px/error_red_28px.svg | 18 + .../resources/28px/information_blue_28px.svg | 19 + .../webapp/resources/28px/tick_green_28px.svg | 17 + .../webapp/resources/28px/warning_yellow_28px.svg | 23 + .../resources/contextMenu/menu_black_16px.svg | 18 + .../webapp/resources/controls/close_exit_icon.svg | 16 + .../webapp/resources/controls/collapse_icon.svg | 12 + .../webapp/resources/controls/down_arrow.svg | 12 + .../webapp/resources/controls/down_arrow_hit.svg | 12 + .../webapp/resources/controls/expand_icon.svg | 12 + .../webapp/resources/controls/info-black-16x16.svg | 18 + .../webapp/resources/controls/left_arrow.svg | 13 + .../webapp/resources/controls/left_arrow_.svg | 12 + .../webapp/resources/controls/left_arrow_hit.svg | 12 + .../webapp/resources/controls/magnify_black.svg | 14 + .../webapp/resources/controls/next_arrows_hit.svg | 14 + .../resources/controls/previous_arrows_hit.svg | 14 + .../webapp/resources/controls/right_arrow.svg | 13 + .../webapp/resources/controls/right_arrow_.svg | 12 + .../webapp/resources/controls/right_arrow_hit.svg | 12 + .../webapp/resources/controls/save_black.svg | 13 + .../webapp/resources/controls/up_arrow.svg | 12 + .../webapp/resources/controls/up_arrow_hit.svg | 12 + .../webapp/resources/dialogs/confirmation_icon.svg | 17 + .../webapp/resources/dialogs/error_icon.svg | 18 + .../webapp/resources/dialogs/information_icon.svg | 17 + .../webapp/resources/dialogs/warning_icon.svg | 19 + .../webapp/resources/drilldownPath/arrow.svg | 8 + .../webapp/resources/form/checkbox_tick.svg | 13 + .../webapp/resources/form/checkbox_tick_black.svg | 13 + .../webapp/resources/form/checkbox_tick_green.svg | 13 + .../webapp/resources/form/checkbox_triple.svg | 12 + .../resources/form/checkbox_triple_black.svg | 12 + .../resources/form/checkbox_triple_green.svg | 12 + .../webapp/resources/form/invalid_icon.svg | 16 + .../webapp/resources/form/radio_tick_black.svg | 16 + .../webapp/resources/form/radio_tick_green.svg | 16 + .../resources/webapp/resources/form/valid_icon.svg | 16 + .../other/ArrowDoubleLeft_black_10x8px.svg | 16 + .../other/ArrowDoubleRight_black_10x8px.svg | 16 + .../resources/other/ArrowDown_black_8x5px.svg | 14 + .../resources/other/ArrowLeft_black_5x8px.svg | 14 + .../resources/other/ArrowRight_black_5x8px.svg | 14 + .../webapp/resources/other/ArrowUp_black_8x5px.svg | 14 + .../webapp/resources/other/errorSmall_red_10px.svg | 15 + .../webapp/resources/other/tick_black_10x8px.svg | 15 + .../webapp/resources/other/tick_green_10x8px.svg | 15 + .../webapp/resources/pagination/pagination_end.svg | 8 + .../resources/pagination/pagination_next.svg | 13 + .../resources/pagination/pagination_previous.svg | 14 + .../resources/pagination/pagination_start.svg | 8 + .../webapp/resources/systemBar/help_black.svg | 19 + .../webapp/resources/systemBar/logout_black.svg | 15 + .../webapp/resources/whitelabel/button.png | Bin 0 -> 44599 bytes .../resources/whitelabel/pagecustomization.PNG | Bin 0 -> 49551 bytes .../webapp/resources/whitelabel/systembar.png | Bin 0 -> 38262 bytes .../webapp/resources/whitelabel/table.png | Bin 0 -> 59715 bytes .../webapp/resources/whitelabel/typography.png | Bin 0 -> 38452 bytes 469 files changed, 43502 insertions(+) create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/WEB-INF/web.xml create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/close.html create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/css/close.css create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/css/contextMenu.css create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/css/dropdownList.css create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/css/fileMenu.css create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/css/interfaceAssets.css create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/css/showhideTextarea.css create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/css/styles.css create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/images/Apex.png create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/images/logo_onap.png create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/index.html create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexAjax.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumEditForm.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumTab.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaEditForm.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaTab.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventEditForm.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventTab.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFormUtils.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexKeyInformationTab.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexMain.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexModelHandling.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPageControl.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm_State.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyTab.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexResultForm.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTable.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskEditForm.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexUtils.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/contextMenu.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/edit_area_full.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/autocompletion.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/close.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/fullscreen.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/go_to_line.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/help.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/highlight.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/load.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/move.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/newdocument.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/opacity.png create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/processing.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/redo.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/reset_highlight.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/save.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/search.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/smooth_selection.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/spacer.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/statusbar_resize.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/undo.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/word_wrap.gif create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/bg.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/cs.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/de.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/dk.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/en.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/eo.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/es.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/fi.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/fr.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/hr.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/it.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/ja.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/mk.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/nl.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/pl.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/pt.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/ru.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/sk.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/zh.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/license_apache.txt create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/basic.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/brainfuck.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/c.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/coldfusion.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/cpp.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/css.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/html.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/java.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/js.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/pas.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/perl.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/php.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/python.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/robotstxt.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/ruby.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/sql.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/tsql.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/vb.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/xml.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/fileMenu.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/AUTHORS.txt create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/LICENSE.txt create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/external/jquery/jquery.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/images/ui-icons_444444_256x240.png create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/images/ui-icons_555555_256x240.png create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/images/ui-icons_777620_256x240.png create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/images/ui-icons_777777_256x240.png create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/images/ui-icons_cc0000_256x240.png create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/images/ui-icons_ffffff_256x240.png create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/index.html create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.css create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.min.css create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.min.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.structure.css create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.structure.min.css create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.theme.css create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.theme.min.css create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/package.json create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/showhideElement.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/js/showhideTextarea.js create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/10px/ArrowDoubleLeftSmall_black_10px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/10px/ArrowDoubleRightSmall_black_10px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/10px/ArrowDownSmall_black_10px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/10px/ArrowLeftSmall_black_10px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/10px/ArrowRightSmall_black_10px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/10px/ArrowUpSmall_black_10px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowDoubleLeftSmall_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowDoubleRightSmall_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowDownSmall_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowDownSmall_blue_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowDownSmall_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowDown_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowDown_blue_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowDown_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowLeftSmall_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowLeftSmall_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowLeft_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowLeft_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowRightSmall_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowRightSmall_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowRight_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowRight_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowUpSmall_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowUp_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ArrowUp_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/BSCFunction_Yellow_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/BSCFunction_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/BSC_Yellow_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/BSC_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/Cancelled_Black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/CommandLineInterface_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/CommandLineInterface_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/Comment_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/Link_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/RBS_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/RBS_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/SyncError_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/Syncd_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/Syncing_Animated_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/Syncing_Static_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/WindowMaximize_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/WindowMinimize_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/X_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/X_blue_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/X_green_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/X_orange_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/X_paleBlue_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/X_red_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/X_yellow_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/accessSettings_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/accessSettings_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/access_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/access_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/acknowledgeAlarm.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/acknowledgeAlarm_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/activate_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/activate_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/activity_16px_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/addToFolder_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/addToFolder_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/add_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/add_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/advanced_search_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/advanced_search_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmCleared_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmCleared_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmCritical_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmCritical_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmHeartbeat_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmIndeterminate_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmIndeterminate_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmMajor_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmMajor_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmMinor_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmMinor_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmOtherGrouping_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmUnacknowledged.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmUnacknowledged_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmUnspecified_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmWarning_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alarmWarning_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alignCenter_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alignCenter_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alignLeft_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alignLeft_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alignRight_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/alignRight_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/arrowUpSmall_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/attach_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/attach_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/baseStation.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/cabinet_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/calendar_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/calendar_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/cellAdjacent_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/cellExternal_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/cell_gray_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/cell_green_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/cell_red_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/charging_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/charging_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleArrowDown_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleArrowDown_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleArrowLeft_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleArrowLeft_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleArrowRight_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleArrowRight_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleArrowUp_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleArrowUp_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleCaretDown_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleCaretDown_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleCaretLeft_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleCaretLeft_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleCaretRight_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleCaretRight_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleCaretUp_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/circleCaretUp_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/clearAlarm.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/clearAlarm_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/clock_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/clock_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/close_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/comment_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/connected_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/connectionError_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/controllingNode.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/copy_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/copy_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/coreSubscriber_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/core_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/cut_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/cut_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/database_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/deactivate_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/deactivate_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/delete_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/delete_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/deprecated_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/detach_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/detach_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/dialogInfo_blue.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/dialogInfo_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/disconnected_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/document_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/download_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/download_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/download_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/draft.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/duplicate_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/duplicate_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/edit_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/edit_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/error_red_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/expand_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/export_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/export_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/externalApp_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/externalApp_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/eyeLine_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/eyeLine_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/eye_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/eye_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/fastForward_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/fastRewind_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/filter_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/filter_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/filters_off.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/filters_on.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/folderClosed_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/folderClosed_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/folder_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/folder_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ftpServerFunction_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/ftpServer_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/fullscreenMinimise_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/fullscreen_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/gatewayFunction_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/grabHandle_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/grabHandle_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/grid3X3_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/grid3x3_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/grid4X4_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/grid4x4_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/gridView_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/gridView_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/help_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/help_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/import_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/import_export.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/import_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/infoMsgIndicator_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/info_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/info_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/invalid_icon.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/jumpTo_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/lock_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/lock_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/login.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/logout_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/mailRead_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/mailRead_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/mail_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/mail_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/managedFunction_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/managedGroup_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/managementNode_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/menu_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/menu_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/microwave.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/minimiseFullscreen_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/minus_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/mo.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/move.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/multi-sort.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/multi-sort_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/multiSelect_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/multiSelect_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/networkElement_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/networkElement_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/network_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/newFile_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/newFile_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/newStatus_blue_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/newStatus_green_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/note_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/note_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/obsolete_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/pause_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/play_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/plus_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/print_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/print_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/refresh_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/refresh_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/remove.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/resume_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/routeSwitch.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/rowCollapsed_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/rowExpanded_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/rowView_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/rowView_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/rxi_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/save_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/save_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/search_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/search_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/security_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/security_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/settings_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/settings_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/share_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/share_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/simple_green_tick.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/simple_tick.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/siteManager_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/site_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/sort.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/sort_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/star_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/star_outline_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/star_outline_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/star_outline_yellow_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/star_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/star_yellow_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/stop_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/subnetwork.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/suspend_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/switch.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/switchBetween_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/switchBetween_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/switchFunction_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/tableView_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/tableView_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/technicianPresent_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/terminal_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/tick_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/tick_green_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/tip_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/tip_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/topology_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/undo_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/undo_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/unlock_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/unlock_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/upload_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/user_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/user_white_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/valid_icon.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/warningShield_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/warningShield_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/warning_orange_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/warning_white.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/16px/warning_yellow_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/28px/error_red_28px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/28px/information_blue_28px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/28px/tick_green_28px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/28px/warning_yellow_28px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/contextMenu/menu_black_16px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/close_exit_icon.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/collapse_icon.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/down_arrow.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/down_arrow_hit.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/expand_icon.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/info-black-16x16.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/left_arrow.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/left_arrow_.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/left_arrow_hit.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/magnify_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/next_arrows_hit.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/previous_arrows_hit.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/right_arrow.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/right_arrow_.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/right_arrow_hit.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/save_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/up_arrow.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/controls/up_arrow_hit.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/dialogs/confirmation_icon.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/dialogs/error_icon.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/dialogs/information_icon.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/dialogs/warning_icon.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/drilldownPath/arrow.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/form/checkbox_tick.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/form/checkbox_tick_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/form/checkbox_tick_green.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/form/checkbox_triple.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/form/checkbox_triple_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/form/checkbox_triple_green.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/form/invalid_icon.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/form/radio_tick_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/form/radio_tick_green.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/form/valid_icon.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/other/ArrowDoubleLeft_black_10x8px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/other/ArrowDoubleRight_black_10x8px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/other/ArrowDown_black_8x5px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/other/ArrowLeft_black_5x8px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/other/ArrowRight_black_5x8px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/other/ArrowUp_black_8x5px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/other/errorSmall_red_10px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/other/tick_black_10x8px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/other/tick_green_10x8px.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/pagination/pagination_end.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/pagination/pagination_next.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/pagination/pagination_previous.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/pagination/pagination_start.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/systemBar/help_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/systemBar/logout_black.svg create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/whitelabel/button.png create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/whitelabel/pagecustomization.PNG create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/whitelabel/systembar.png create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/whitelabel/table.png create mode 100644 gui-editors/gui-editor-apex/src/main/resources/webapp/resources/whitelabel/typography.png (limited to 'gui-editors/gui-editor-apex/src/main/resources/webapp') diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/WEB-INF/web.xml b/gui-editors/gui-editor-apex/src/main/resources/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..c60f575 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/WEB-INF/web.xml @@ -0,0 +1,43 @@ + + + + + + + + apex-services.rest + org.glassfish.jersey.servlet.ServletContainer + + jersey.config.server.provider.packages + org.onap.policy.apex.client.editor.rest + + 1 + + + apex-services.rest + /apexservices/* + + + diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/close.html b/gui-editors/gui-editor-apex/src/main/resources/webapp/close.html new file mode 100644 index 0000000..4ecd386 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/close.html @@ -0,0 +1,45 @@ + + + + + +Apex Editor + + + + +
+
Apex Policy Editor
+
+ +
+ +

Thanks for using the Apex editor :-) +

+ For more information, see the + Apex confluence page. +

+ + + \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/close.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/close.css new file mode 100644 index 0000000..128c060 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/close.css @@ -0,0 +1,48 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +html, body { + height: 100%; +} + +.placeholder { + text-align: center; + position: relative; + top: 50%; + margin: -200px auto; + white-space: nowrap; +} + +.placeholderLogo { + z-index: -1; + position: relative; +} + +.onapLogo { + padding-right: 100px; + height: 300px; + width: 400px; +} + +.apexLogo { + height: 300px; + width: 400px; +} \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/contextMenu.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/contextMenu.css new file mode 100644 index 0000000..78f5288 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/contextMenu.css @@ -0,0 +1,111 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +.contextmenu_hide { + display: none; +} + +.contextmenu_show { + font-family: Helvetica, Arial, sans-serif; + font-weight: 300; + list-style: none; + padding: 0 0 0 5px; + margin: 0; + background: rgba(255,255,255,.85); + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + color: 000; + box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25); + z-index:1000; + position: absolute; + white-space: nowrap; + float: left; + width: auto; +} + +.contextmenu_show ul { + padding: 0; + margin: 0; + list-style: none; + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176); + background: #f5f5f5; + border: 1px solid #ccc; + border-radius: 0 0 5px 5px; + color: #000; + font-weight: 300; +} + +.contextmenu_show > li { + display: inline-block; + padding: 3px 5px; + margin: 0; +} + +.contextmenu_show > li.selected { + background: #007bff; + color: #fff; + font-weight: 400; +} + +.contextmenu_show li { + cursor: default; + transition: all .1s; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.contextmenu_show ul li { + line-height: 1.5em; + padding: 0 5px; +} + +.contextmenu_show ul li.disabled { + color: #999; + pointer-events: none; +} + +.contextmenu_show ul li:hover { + background: #007bff; + color: #fff; + font-weight: 400; +} + +.contextmenu_show ul li ul { + border-radius: 5px; + position: absolute; + margin-top: -70px; +} + +.contextmenu_show ul li type{ + line-height: 1.5em; + padding: 0 5px; + font-family: monospace; +} + +.contextmenu_show ul li value{ + line-height: 1.5em; + padding: 0 5px; + font-family: monospace; +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/dropdownList.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/dropdownList.css new file mode 100644 index 0000000..483a1ce --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/dropdownList.css @@ -0,0 +1,134 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +.dropdownList_display { + display: inline-block; + vertical-align: middle; + text-align: left; + font-size: 1.2rem; + height: 2.4rem; + padding: 2px 7px; + border: 1px solid #b3b3b3; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-radius: 3px; + box-shadow: inset 1px 1px 0 0 #cccccc; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + font-family: Arial,Helvetica,sans-serif; + font-size: 1em; + border-width: 1px 0 1px 1px; + border-radius: 3px 0 0 3px; + cursor: pointer; + overflow: hidden; +} + +.dropdownList_display_disabled { + display: inline-block; + vertical-align: middle; + text-align: left; + font-size: 1.2rem; + height: 2.4rem; + padding: 0.4rem 0.6rem; + border: 1px solid #b3b3b3; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-radius: 3px; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + font-family: Arial,Helvetica,sans-serif; + font-size: 1em; + border-width: 1px 0 1px 1px; + border-radius: 3px 0 0 3px; + color: #B2B2B2; + border-color: #B2B2B2; + background-color: rgba(0, 0, 0, 0.05); + -webkit-text-fill-color: #b2b2b2; + opacity: 1; + -ms-touch-action: none !important; + touch-action: none !important; + box-shadow: inset 1px 1px 0 0 #cccccc; + overflow: hidden; +} + +.dropdownList_display_clicked, .dropdownList_display:hover, .dropdownList_display:focus { + //background: #007bff; +} + +.dropdownList_display_disabled :hover, .dropdownList_display_disabled :focus { +} + +.dropdownList { + position: relative; + display: inline-block; +} + +.dropdownList_options { + display: none; + position: absolute; + z-index: 1500; + padding: 0 0 4px 0; + margin: 0; + color: #333; + list-style: none; + background-color: #fff; + border: #bfbfbf solid 1px; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2); + border-radius: 3px; + -moz-box-sizing: border-box; + box-sizing: border-box; + box-shadow: 5px 5px 5px #87888A; +} + +.dropdownList_options ul li { + padding: 0px; + margin: 0; + text-decoration: none; + display: block; +} + +.dropdownList_options ul li.selected { + background: #007bff; + color: #fff; + font-weight: 400; +} + +.dropdownList_options ul li.disabled { + color: #999; + pointer-events: none; +} + +.dropdownList_options_body { + margin-left: -40px; +} + +.dropdownList ul li:hover { + background: #007bff; + color: #fff; + font-weight: 400; + cursor: pointer; +} + +.dropdownList_show {display:block;} \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/fileMenu.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/fileMenu.css new file mode 100644 index 0000000..8d905d7 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/fileMenu.css @@ -0,0 +1,195 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +.fileMenu { + font-family: Helvetica, Arial, sans-serif; + font-weight: 300; + list-style: none; + padding: 0 0 0 5px; + margin: 0; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + color: 000; +} + +.fileMenu ul { + display: none; + position: absolute; + z-index:9999; + padding: 0; + margin: 0; + list-style: none; + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176); + min-width: 250px; + background: #f5f5f5; + border: 1px solid #ccc; + border-radius: 0 0 5px 5px; + color: #000; + font-weight: 300; + text-align: left; +} + +.fileMenu > li { + display: inline-block; + padding: 3px 5px; + margin: 0; +} + +.fileMenu > li.selected { + background: #007bff; + color: #fff; + font-weight: 400; +} + +.fileMenu li { + cursor: default; + transition: all .1s; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.fileMenu li.divider { + margin: 3px 0; + height: 1px; + background: #b3b3b3; + pointer-events: none; +} + +.fileMenu li i { + font-size: .8em; + text-align: center; + color: #444; + transition: all .1s; + +} + +.fileMenu li i:before { + position: relative; + top: -.1em; +} + +.fileMenu > li.selected > i, +.fileMenu ul li:hover > i { + color: #ebebeb; +} + +.fileMenu ul li { + line-height: 1.5em; + padding: 0 5px; +} + +.fileMenu ul li.toggle.active i:before { + content: '\f00c'; +} + +.fileMenu ul li.disabled { + color: #999; + pointer-events: none; +} + +.fileMenu ul li.disabled i { + color: #aaa; +} + +.fileMenu ul li.sub:after { + font: normal normal normal; + content: '\f0da'; + float: right; + color: #999; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + transform: translate(0, 0); + line-height: inherit; + transition: all .1s; +} + +.fileMenu ul li.sub:hover:after { + color: #fff; +} + +.fileMenu ul li:hover { + background: #007bff; + color: #fff; + font-weight: 400; +} + +.fileMenu ul li:last-child { + border-radius: 0 0 5px 5px; +} + +.fileMenu ul li:hover ul { + display: block; +} + +.fileMenu ul li kbd { + float: right; + font-weight: 300; + font-family: inherit; + color: #999; +} + +.fileMenu ul li ul { + border-radius: 5px; + position: absolute; + margin-top: -70px; +} + +.fileMenu ul li ul li:first-child { + border-radius: 5px 5px 0 0; +} + +.fileMenuButton { + display: inline-block; + vertical-align: middle; + color: #333; + background-color: #fff; + border: none; + min-width: 60px; + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); + border-radius: 3px; + -moz-box-sizing: border-box; + box-sizing: border-box; + background-image: linear-gradient(180deg, rgba(0,0,0,0) 0, rgba(0,0,0,0.1) 100%); + padding: 0 8px; + height: 2.4rem; + text-decoration: none; + text-align: center; + cursor: pointer; + line-height: 18px; +} + +.fileMenuSeperator { + display: inline-block; + white-space: nowrap; + vertical-align: middle; + width: 1px; + height: 24px; + background-color: #CCC; + margin: 0 6px; + font-size: 2.4rem; + margin: 0px 10px; +} \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/interfaceAssets.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/interfaceAssets.css new file mode 100644 index 0000000..b309cb2 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/interfaceAssets.css @@ -0,0 +1,2808 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +@charset "utf-8"; +html { + position: relative; + font-family: Arial, Helvetica, sans-serif; + font-size: 10px !important; + line-height: 10px !important; + margin: 0; + padding: 0; + width: 100%; + height: 100%; +} +body { + font-size: 1.6rem; + line-height: 1.2rem; + color: #333333; + background-color: #ffffff; + margin: 0; + padding: 0; +} +*:focus, +.ebInput:focus, +.ebIcon:focus, +.ebCheckbox:focus + .ebCheckbox-inputStatus:after, +.ebRadioBtn:focus + .ebRadioBtn-inputStatus:after, +textarea:focus, +button:focus, +i:focus { + /** + * FF outline do not looks same as Chrome so adding box shadow + * FF outline is not working as expected + **/ + /* + * one way of outline + outline: #4d90fe auto 5px; + box-shadow: 0 0 0 1px #4d90fe; + -webkit-box-shadow: none; + */ + outline: none; + //box-shadow: 0 0 2px 1px #FFFFFF; +} +h1, +h2, +h3, +h4, +h5, +h6 { + color: #4d4d4d; + font-weight: bold; +} +h1 { + line-height: 3.2rem; + font-size: 3.2rem; + font-weight: normal; + padding: 0.6rem 0; + margin: 0 0 0.6rem 0; +} +h2 { + border-bottom: #000000 solid 1px; + line-height: 2.0rem; + font-size: 2.0rem; + font-weight: normal; + padding: 1.2rem 0 0.7rem 0; + margin: 0 0 0.4rem 0; +} +h3 { + border-bottom: #7f7f7f solid 1px; + line-height: 1.6rem; + font-size: 1.6rem; + padding: 1.2rem 0 0.7rem 0; + margin: 0 0 0.4rem 0; + font-weight: normal; + color: #333333; +} +h4 { + border-bottom: #b2b2b2 solid 1px; + line-height: 1.2rem; + font-size: 1.2rem; + padding: 0.6rem 0; + margin: 0 0 0.6rem 0; + font-weight: bold; + color: #333333; +} +.ebLayout-SectionSubheading h3 { + float: left; + margin: 0; + border-bottom: none; +} + +/* System Bar */ +.ebSystemBar { + position: relative; + width: 100%; + height: 40px; + border-top: 4px solid #0066b3; + background-image: linear-gradient(180deg, #ffffff 0%, #f4f4f4 100%); + box-shadow: 0 1px 2px #D2D2D2; +} +.ebSystemBar::before { + position: absolute; + top: -4px; + left: 0; + width: 100%; + height: 4px; + content: ""; + font-size: 0; + background: #0066b3; + background: -o-linear-gradient(left, #a2c517 10%, #009046 30%, #0082b6 50%, #151f77 75%, #db0050 100%); + background: -moz-linear-gradient(left, #a2c517 10%, #009046 30%, #0082b6 50%, #151f77 75%, #db0050 100%); + background: -webkit-linear-gradient(left, #a2c517 10%, #009046 30%, #0082b6 50%, #151f77 75%, #db0050 100%); + background: -ms-linear-gradient(left, #a2c517 10%, #009046 30%, #0082b6 50%, #151f77 75%, #db0050 100%); + background: -webkit-gradient(linear, left top, right top, color-stop(0.1, #a2c517), color-stop(0.3, #009046), color-stop(0.5, #0082b6), color-stop(0.75, #151f77), color-stop(1, #db0050)); + background: linear-gradient(left, #a2c517 10%, #009046 30%, #0082b6 50%, #151f77 75%, #db0050 100%); +} +.ebSystemBar-logo { + position: absolute; + top: 0; + bottom: 0; + left: 0; + height: 40px; + width: 20px; + padding: 0 10px; + background: url('../resources/systemBar/econ01.svg') no-repeat center center transparent; + background-size: 20px; +} +.ebSystemBar-topMenuName { + display: inline-block; + padding: 0 5px 0 40px; + margin: 0; + line-height: 40px; + font-size: 16.8px; + color: #58585A; +} +.ebSystemBar-topMenu { + position: absolute; + top: 0; + bottom: 0; + left: 50px; + list-style: none; + height: 40px; + margin: 0; + padding: 0; +} +.ebSystemBar-topMenu li { + display: inline-block; +} +.ebSystemBar-topMenu a { + padding: 0 5px 0 15px; + margin: 0; + font-size: 1.6em; + line-height: 40px; + color: #58585a; + cursor: pointer; + text-decoration: none; +} +.ebSystemBar-topMenu a:hover { + color: #0066B3; +} +.ebSystemBar-rightButton { + float: right; + display: inline-block; + line-height: 40px; + vertical-align: middle; +} +.ebSystemBar-rightButton a { + display: block; + padding: 0 18px 0 18px; + font-size: 1.3rem; + color: #0066B3; + background-color: transparent; + background-repeat: no-repeat; + background-position: 18px center; + border-left: solid 1px #D2D2D2; +} +.ebSystemBar-rightButton a:hover { + text-decoration: underline; +} +.ebSystemBar-rightButton:hover { + background-image: linear-gradient(180deg, #f2f2f2 0%, #e8e8e8 100%); +} +@media screen and (max-width: 640px) { + .ebSystemBar-topBar-rightButton a { + width: 0; + padding-left: 34px; + text-indent: -9999px; + } +} + +/* Inline Message */ +.ebInlineMessage { + padding: 5px 15px 0px 7px; + font-size: 0; + position: fixed; + bottom: 0; + left: 2; + width: calc(100% - 30px); + height: 66px; + border: 3px solid #adadad; + background-color: #FFFFFF; +} +.ebInlineMessage-iconHolder, +.ebInlineMessage-contentHolder { + display: inline-block; + vertical-align: top; +} +.ebInlineMessage-iconHolder { + width: 20px; + margin: 0 12px 0 0; +} +.ebInlineMessage-contentHolder { + width: calc(100% - 32px); + font-size: 1.2rem; +} +.ebInlineMessage-header { + margin-top: 3px; + font-size: 14px; + line-height: 14px; +} +.ebInlineMessage-separator { + height: 1px; + margin: 12px 0; + background-color: #adadad; + opacity: 0.3; +} +.ebInlineMessage-description { + color: #666666; + white-space: pre; +} + +/* Table */ +.ebTable { + margin: 0; + padding: 0; + table-layout: fixed; + border-left: 1px solid #cccccc; // ewatkmi: added for visible border; + border-right: 1px solid #cccccc; // ewatkmi: added for visible border; + border-bottom: 1px solid #cccccc; // ewatkmi: added for visible border; + border-collapse: collapse; + border-spacing: 0; + color: #1a1a1a; +} +.ebTable_fullW { + width: 100%; +} +.ebTable-th_resizable, +.ebTable-th_sortable { + position: relative; +} +.ebTable-th_resizable .ebTable-headerResize { + position: absolute; + top: -20px; + bottom: -20px; + right: -12px; + width: 10px; + cursor: col-resize; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + -webkit-user-select: none; + user-select: none; +} +.ebTable-th_sortable { + cursor: pointer !important; +} +.ebTable-th_sortable .ebTable-header { + display: flex; + flex-wrap: nowrap; + flex-direction: row; + align-items: center; +} +.ebTable-th_sortable .ebTable-headerText { + flex-shrink: 1; + flex-grow: 0; + margin-right: 8px; + box-sizing: border-box; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + -webkit-user-select: none; + user-select: none; +} +.ebTable-th_sortable .ebTable-headerSort { + flex-grow: 0; + flex-shrink: 0; + flex-basis: 10px; + margin-left: 4px; +} +.ebTable-th_sortable .ebTable-headerSortOrder { + flex-grow: 1; + color: #999999; + font-weight: normal; +} +.ebTable-header { + position: relative; + display: block; + width: 100%; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.ebTable-headerText { + padding: 4px 0; + display: inline-block; + vertical-align: middle; + width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.ebTable thead tr { + height: 3.2rem; + font-size: 1.2rem; + font-weight: bold; + text-align: left; +} +.ebTable thead tr th { + padding-left: 1.2rem; + padding-right: 1.2rem; + text-align: left; + cursor: default; + border-top: #cccccc solid 1px; + border-bottom: #cccccc solid 1px; + border-right: #e6e6e6 solid 1px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ebTable thead tr th:last-child { + border-right: none; +} +.ebTable thead tr:hover { + background: none; +} +.ebTable thead tr:active { + background: none; +} +.ebTable tbody tr { + height: 3.2rem; + font-size: 1.2rem; + border-bottom: #e6e6e6 solid 1px; +} +.ebTable tbody tr td { + margin: 0; + padding: 0 1.2rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + cursor: default; + border-right: #e6e6e6 solid 1px; +} +.ebTable tbody tr td:last-child { + border-right: none; +} +.ebTable_striped tbody tr { + border-bottom: none; +} +.ebTable_striped tbody tr td { + border-right: none; +} +.ebTable_striped tbody tr:nth-of-type(even) { + background-color: #f2f2f2; +} +.ebTable_striped tbody tr:nth-of-type(odd) { // ewatkmi: added for nested tables; + background-color: #ffffff; +} +.ebTable_compact tbody tr { + height: 2.6rem; +} +.ebTable_expandableStriped { + border-collapse: separate; +} +.ebTable_expandableStriped tbody tr { + border-bottom: none; +} +.ebTable_expandableStriped tbody tr td { + border-right: none; +} +.ebTable_expandableStriped tbody tr:nth-of-type(4n-1), +.ebTable_expandableStriped tbody tr:nth-of-type(4n) { + background-color: #f2f2f2; +} +.ebTable_pinstripe tr td { + border-bottom: #e6e6e6 solid 1px; +} +.ebTable_color_paleBlue.ebTable thead tr th { + background-color: #99ddee; + border-top: none; + border-bottom: none; +} +.ebTable_color_paleBlue.ebTable_striped tbody tr:nth-of-type(even) { + background-color: #e6f6fb; +} +.ebTable_color_purple.ebTable thead tr th { + background-color: #ca9bc1; + border-top: none; + border-bottom: none; +} +.ebTable_color_purple.ebTable_striped tbody tr:nth-of-type(even) { + background-color: #f2e6ef; +} +.ebTable_color_darkGreen.ebTable thead tr th { + background-color: #99c0bf; + border-top: none; + border-bottom: none; +} +.ebTable_color_darkGreen.ebTable_striped tbody tr:nth-of-type(even) { + background-color: #e6efef; +} +.ebTable_color_green.ebTable thead tr th { + background-color: #d0e3a2; + border-top: none; + border-bottom: none; +} +.ebTable_color_green.ebTable_striped tbody tr:nth-of-type(even) { + background-color: #f3f8e8; +} +.ebTable_color_yellow.ebTable thead tr th { + background-color: #fde499; + border-top: none; + border-bottom: none; +} +.ebTable_color_yellow.ebTable_striped tbody tr:nth-of-type(even) { + background-color: #fff8e6; +} +.ebTable_color_orange.ebTable thead tr th { + background-color: #f9d099; + border-top: none; + border-bottom: none; +} +.ebTable_color_orange.ebTable_striped tbody tr:nth-of-type(even) { + background-color: #fef3e6; +} +.ebTable_color_red.ebTable thead tr th { + background-color: #f4a6a3; + border-top: none; + border-bottom: none; +} +.ebTable_color_red.ebTable_striped tbody tr:nth-of-type(even) { + background-color: #fce9e8; +} +.ebTable_borderTop_none thead tr th { + border-top: none; +} +.ebTable_verticalBorders_none thead tr th, +.ebTable_verticalBorders_none tr td { + border-right: none !important; + border-left: none !important; +} +.ebTable_wrapHeaders th { + white-space: normal !important; + text-overflow: inherit !important; +} +.ebTable_wrapHeaders th .ebTable-headerText { + white-space: normal !important; + text-overflow: inherit !important; +} +.ebTable-expandableRow { + height: inherit !important; + display: none; +} +.ebTable-expandableRow_expanded { + display: table-row; +} +.ebTable-expandableRow > td { + padding: 0 !important; +} +.ebTable-expandableRow > td > div { + overflow: hidden; + height: 0; + transition: height 0.3s ease-in-out; +} +/** + * Hover/Active/Selected Effects + * + * Modifiers: + * .ebTable_hoverActive_none (disables native hover and active selectors, primarily for pin columns plugin) + */ +.ebTable { + /** Hover effect **/ +} +.ebTable.ebTable:not(.ebTable_hoverActive_none) tbody tr:not(.ebTable-expandableRow):not(.headerRow):hover > *, +.ebTable tbody tr:not(.ebTable-expandableRow):not(.headerRow).ebTableRow_hover > * { + background-image: linear-gradient(0deg, rgba(0, 102, 179, 0.1), rgba(0, 102, 179, 0.1)); +} +.ebTable.ebTable_highlightedEffect_solid tbody tr:not(.ebTable-expandableRow).ebTableRow_highlighted > * { + background-color: #ffffff !important; +} + +/* Context Menu */ +.ebContextMenu { + position: relative; + width: 16px; + height: 16px; +} +.ebContextMenu:focus { + outline: none; +} +.ebContextMenu-ExpandBtn, +.ebContextMenu-expandBtn { + width: 16px; + height: 16px; + position: relative; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + -webkit-user-select: none; + user-select: none; +} +.ebContextMenu-ExpandBtn:focus, +.ebContextMenu-expandBtn:focus { + outline: none; +} +.ebContextMenu-Dropdown, +.ebContextMenu-body { + position: absolute; + z-index: 1500; + min-width: 60px; + width: auto; + height: auto; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + -webkit-user-select: none; + user-select: none; + box-shadow: 5px 5px 5px #87888A; +} +.ebContextMenu-Dropdown_corner_default, +.ebContextMenu-body_corner_default { + position: absolute; + top: 20px; + left: 0px; +} +.ebContextMenu-Dropdown_corner_topRight, +.ebContextMenu-body_corner_topRight { + position: absolute; + top: 20px; + right: 0px; +} +.ebContextMenu-Dropdown_corner_bottomLeft, +.ebContextMenu-body_corner_bottomLeft { + position: absolute; + bottom: 20px; + left: 0px; +} +.ebContextMenu-Dropdown_corner_bottomRight, +.ebContextMenu-body_corner_bottomRight { + position: absolute; + bottom: 20px; + right: 0px; +} +.ebContextMenu-Dropdown_visible_false, +.ebContextMenu-body_visible_false { + visibility: hidden; +} +.ebContextMenu-Dropdown_visible_true, +.ebContextMenu-body_visible_true { + display: block; +} + +/* Component List */ +.ebComponentList { + position: relative; + z-index: 1500; + padding: 4px 0; + margin: 0; + color: #333333; + list-style: none; + background-color: #ffffff; + border: #bfbfbf solid 1px; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2); + border-radius: 3px; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.ebComponentList-group, +.ebComponentList-item { + padding: 0 0.8rem; + line-height: 2.4rem; + font-size: 1.2rem; + background-color: #ffffff; +} +.ebComponentList-iconHolder { + display: inline-block; + vertical-align: middle; + width: 16px; + padding-right: 8px; +} +.ebComponentList-item { + cursor: pointer; +} +.ebComponentList-item-name { + display: inline-block; + font-size: 12px; + text-overflow: ellipsis; + overflow: hidden; + width: calc(100% - 24px); + vertical-align: middle; +} +.ebComponentList-item_icon { + font-size: 0; +} +.ebComponentList-link, +.ebComponentList-item, +.ebComponentList-item > *, +.ebComponentList-group-header { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.ebComponentList-group { + display: block; +} +.ebComponentList-group_expandable_collapsed > .ebComponentList-group-header, +.ebComponentList-group_expandable_expanded > .ebComponentList-group-header { + font-size: 0; + cursor: pointer; + white-space: nowrap; + height: 24px; + vertical-align: middle; +} +.ebComponentList-group_expandable_collapsed > .ebComponentList-group-header .ebComponentList-iconHolder + .ebComponentList-group-name, +.ebComponentList-group_expandable_expanded > .ebComponentList-group-header .ebComponentList-iconHolder + .ebComponentList-group-name { + width: calc(100% - 40px); +} +.ebComponentList-group_expandable_collapsed > .ebComponentList-inner, +.ebComponentList-group_expandable_expanded > .ebComponentList-inner { + padding: 0 0 0 24px; + margin: 0 -0.8rem; +} +.ebComponentList-group_expandable_collapsed > .ebComponentList-group-header { + border: none; +} +.ebComponentList-group_expandable_collapsed > .ebComponentList-inner .ebComponentList-item { + overflow: hidden; + padding: 0; + margin: 0; + height: 0; + opacity: 0; + transition: height 0.2s linear, padding 0.075s 0.075s linear, margin 0.075s 0.075s linear, opacity 0.075s linear; +} +.ebComponentList-group_expandable_collapsed > .ebComponentList-inner .ebComponentList-group_expandable_collapsed .ebComponentList-group-header, +.ebComponentList-group_expandable_collapsed > .ebComponentList-inner .ebComponentList-group_expandable_expanded .ebComponentList-group-header { + overflow: hidden; + padding: 0; + margin: 0; + height: 0; + opacity: 0; + transition: height 0.2s linear, padding 0.075s 0.075s linear, margin 0.075s 0.075s linear, opacity 0.075s linear; +} +.ebComponentList-group_expandable_collapsed > .ebComponentList-inner .ebComponentList-group > .ebComponentList-inner { + padding: 0; + margin: 0; + transition: padding 0.1s 0.1s linear, margin 0.1s 0.1s linear; +} +.ebComponentList-group_expandable_expanded > .ebComponentList-group-header { + border-bottom: 1px solid #999; +} +.ebComponentList-group_expandable_expanded > .ebComponentList-inner > .ebComponentList-item { + overflow: hidden; + height: 24px; + transition: height 0.2s linear, padding 0.075s linear, margin 0.075s linear, opacity 0.15s 0.15s linear; +} +.ebComponentList-group_expandable_expanded > .ebComponentList-inner > .ebComponentList-group_expandable_expanded > .ebComponentList-group-header, +.ebComponentList-group_expandable_expanded > .ebComponentList-inner > .ebComponentList-group_expandable_collapsed > .ebComponentList-group-header { + overflow: hidden; + height: 24px; + text-overflow: ellipsis; + transition: height 0.2s linear, padding 0.075s linear, margin 0.075s linear, opacity 0.15s 0.15s linear; +} +.ebComponentList-group:not(.ebComponentList-group_expandable_collapsed):not(.ebComponentList-group_expandable_expanded) > .ebComponentList-group-header { + cursor: default !important; + pointer-events: none !important; + -ms-touch-action: none !important; + touch-action: none !important; + -khtml-user-select: none !important; + -moz-user-select: none !important; + -o-user-select: none !important; + -webkit-user-select: none !important; + user-select: none; +} +.ebComponentList-group-header { + font-size: 1.2rem; + font-weight: bold; + line-height: 2.4rem; + border-bottom: 1px solid #999; + background-color: #ffffff; +} +.ebComponentList-group-header_icon { + font-size: 0; +} +.ebComponentList-group-header_icon > .ebComponentList-group-name { + width: calc(100% - 24px); +} +.ebComponentList-group-name { + display: inline-block; + width: calc(100% - 16px); + font-size: 1.2rem; + line-height: 2.4rem; + font-weight: bold; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + vertical-align: middle; +} +.ebComponentList-inner { + margin: 0 -0.8rem; + padding: 4px 0 0 0; +} +.ebComponentList-link { + display: block; +} +.ebComponentList-link:hover { + text-decoration: none; +} +.ebComponentList-separator { + height: 1px; + margin: 0.4rem; + background-color: #E6E6E6; +} +.ebComponentList_focus_forced .ebComponentList-item:hover { + background-color: transparent; +} +.ebComponentList_focus_forced .ebComponentList-item_focused:hover { + background-color: #e6f0f7; +} +.ebComponentList:not(.ebComponentList_focus_forced) .ebComponentList-item:hover { + background-color: #e6f0f7; +} +.ebComponentList_focus_forced .ebComponentList-item:active, +.ebComponentList:not(.ebComponentList_focus_forced) .ebComponentList-item:active { + background-color: #cce0f0; +} +.ebComponentList-item { + /* Fixes MultiSelectBox ellipsis bug in Firefox */ + margin: 0px !important; + font-size: 1em !important; +} +.ebComponentList-item_focused { + background-color: #e6f0f7; +} +.ebComponentList-item_disabled { + color: #b0b0af; + cursor: not-allowed !important; +} +.ebComponentList-item_disabled:hover, +.ebComponentList-item_disabled:active { + background-color: inherit !important; +} +.ebComponentList-item_selected { + position: relative; + cursor: default; +} +.ebComponentList-item_selected > .ebComponentList-link { + cursor: default; + color: #333333; + cursor: default !important; + pointer-events: none !important; + -ms-touch-action: none !important; + touch-action: none !important; + -khtml-user-select: none !important; + -moz-user-select: none !important; + -o-user-select: none !important; + -webkit-user-select: none !important; + user-select: none; +} +.ebComponentList-item_selected:before { + position: absolute; + content: ""; + left: 0; + top: 0; + bottom: 0; + width: 100%; + opacity: .2; + background-color: #0967b2; +} +.ebComponentList-item > .ebComponentList-checkboxHolder > .ebCheckbox { + margin-left: 1px; +} +.ebComponentList-item > .ebComponentList-checkboxHolder > .ebCheckbox-label { + padding-left: 3px; + overflow: hidden; + font-size: 12px; + line-height: 2.4rem; + text-overflow: ellipsis; + width: calc(100% - 24px); +} +.ebComponentList-info { + color: #333333; + font-style: italic; + text-align: center; +} +.ebComponentList-info:hover { + background-color: #ffffff; +} +.ebComponentList-info:active { + background-color: #ffffff; +} +.ebComponentList-info, +.ebComponentList-loader { + display: none; + margin: 0.6rem; + cursor: default; +} +.ebComponentList_info .ebComponentList-group, +.ebComponentList_info .ebComponentList-separator, +.ebComponentList_info .ebComponentList-item { + display: none; +} +.ebComponentList_info .ebComponentList-info { + display: block; +} +.ebComponentList_loading { + min-height: 34px; +} +.ebComponentList_loading .ebComponentList-loader { + display: block; +} +.ebComponentList_loading .ebComponentList-item_selected:before { + display: none; +} +.ebComponentList_loading > .ebComponentList-group, +.ebComponentList_loading > .ebComponentList-item, +.ebComponentList_loading > .ebComponentList-items > .ebComponentList-group, +.ebComponentList_loading > .ebComponentList-items > .ebComponentList-item { + opacity: 0.4; +} + +/* Scrollbar */ +.eb_scrollbar { + -webkit-overflow-scrolling: touch; + overflow: auto; +} +.eb_scrollbar::-webkit-scrollbar { + width: 14px; + height: 14px; +} +.eb_scrollbar::-webkit-scrollbar-track { + background-color: #f0f0f0; + background-clip: content-box; +} +.eb_scrollbar::-webkit-scrollbar-thumb { + background-color: #cccccc; + border-radius: 3px; + transition: all 0.2s linear; + background-clip: content-box; +} +.eb_scrollbar::-webkit-scrollbar-thumb:hover { + background-color: #999999; +} +.eb_scrollbar::-webkit-scrollbar-button { + width: 14px; + height: 14px; + background-repeat: no-repeat; + background-color: #f0f0f0; + background-position: center; +} +.eb_scrollbar::-webkit-scrollbar-button:hover { + background-color: #cccccc; +} +.eb_scrollbar::-webkit-scrollbar-button:vertical:decrement { + background-position: center 4px; + background-image: url("data:image/svg+xml;utf8,"); + border-top-left-radius: 2px; + border-top-right-radius: 2px; +} +.eb_scrollbar::-webkit-scrollbar-button:vertical:increment { + background-image: url("data:image/svg+xml;utf8,"); + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; +} +.eb_scrollbar::-webkit-scrollbar-button:horizontal:decrement { + background-position: 4px center; + background-image: url("data:image/svg+xml;utf8,"); + border-bottom-left-radius: 2px; + border-top-left-radius: 2px; +} +.eb_scrollbar::-webkit-scrollbar-button:horizontal:increment { + background-image: url("data:image/svg+xml;utf8,"); + border-bottom-right-radius: 2px; + border-top-right-radius: 2px; +} + + +/* Input */ +.ebInput { + display: inline-block; + vertical-align: middle; + text-align: left; + font-size: 1.2rem; + width: 140px; + height: 2.4rem; + padding: 0.4rem 0.6rem; + border: 1px solid #b3b3b3; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-radius: 3px; + box-shadow: inset 1px 1px 0 0 #cccccc; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; +} +.ebInput_wMargin { + margin: 6px; +} +.ebInput_txtCenter { + text-align: center; +} +.ebInput_miniW, +.ebInput_width_mini { + width: 40px; +} +.ebInput_smallW, +.ebInput_width_small { + width: 80px; +} +.ebInput_longW, +.ebInput_width_long { + width: 180px; +} +.ebInput_xLongW, +.ebInput_width_xLong { + width: 220px; +} +.ebInput_width_full { + min-width: 40px; + width: 100%; +} +.ebInput_noRightSide { + border-width: 1px 0 1px 1px; + border-radius: 3px 0 0 3px; +} +.ebInput_noLeftSide { + border-width: 1px 1px 1px 0; + border-radius: 0 3px 3px 0; + box-shadow: inset 0 1px 0 0 #cccccc; +} +.ebInput:hover { + border-color: #666666; +} +.ebInput[readonly] { + cursor: text; + //box-shadow: none; + border-color: #E3E3E3; + background-color: #f0f0f0; + color: #b2b2b2; +} +.ebInput[readonly]:hover { + //border-color: #E3E3E3; +} +.ebInput_disabled, +.ebInput:disabled { + color: #B2B2B2; + border-color: #B2B2B2; + background-color: rgba(0, 0, 0, 0.05); + -webkit-text-fill-color: #b2b2b2; + opacity: 1; + -ms-touch-action: none !important; + touch-action: none !important; + box-shadow: inset 1px 1px 0 0 #cccccc; +} +.ebInput_borderColor { + border-color: #b3b3b3; +} +.ebInput_borderColor_red { + border-color: #e32119; +} +.ebInput_status_none { + border-color: #b3b3b3; +} +.ebInput_status_warning { + border-color: #f08a00; +} +.ebInput_status_error { + border-color: #e32119; +} +.ebInput.eb_wMargin + .ebInput-status { + margin: -0.2rem 0.8rem 0 0.6rem; +} +.ebInput-status { + display: block; + margin: 0.4rem 0 0 0; + line-height: 1.2rem; + min-height: 1.8rem; + font-size: 1.2rem; + font-weight: normal; +} +.ebInput-statusOk, +.ebInput-statusError { + vertical-align: middle; +} +.ebInput-statusOk:before, +.ebInput-statusError:before { + display: inline-block; + vertical-align: middle; + margin: 0 0.6rem 0 0; + width: 1.2rem; + height: 1.2rem; + content: ''; + background-repeat: no-repeat; +} +.ebInput-statusInfo { + vertical-align: middle; + color: #8d8d8d; +} +.ebInput-statusOk { + color: #89ba17; + display: none; +} +.ebInput-statusOk:before { + background-image: url('../resources/form/valid_icon.svg'); +} +.ebInput-statusError { + color: #e32119; + display: none; +} +.ebInput-statusError:before { + background-image: url('../resources/form/invalid_icon.svg'); +} +.ebInput-status_none { + display: none; +} +.ebInput-status_hide .ebInput-statusOk, +.ebInput-status_hide .ebInput-statusError, +.ebInput-status_hide .ebInput-statusInfo { + display: none; +} +.ebInput-status_info .ebInput-statusInfo { + display: inline-block; +} +.ebInput-status_info .ebInput-statusOk, +.ebInput-status_info .ebInput-statusError { + display: none; +} +.ebInput-status_ok .ebInput-statusOk { + display: inline-block; +} +.ebInput-status_ok .ebInput-statusError, +.ebInput-status_ok .ebInput-statusInfo { + display: none; +} +.ebInput-status_error .ebInput-statusError { + display: inline-block; +} +.ebInput-status_error .ebInput-statusOk, +.ebInput-status_error .ebInput-statusInfo { + display: none; +} +.ebInput:not(.ebInput_validation_focusLost):valid + .ebInput-status:not(.ebInput-status_hide):not(.ebInput-status_info):not(.ebInput-status_ok):not(.ebInput-status_error) .ebInput-statusOk { + display: inline-block; +} +.ebInput:not(.ebInput_validation_focusLost):invalid:not(.ebInput_borderColor):not(.ebInput_status_warning):not(.ebInput_status_none) { + border-color: #e32119; +} +.ebInput:not(.ebInput_validation_focusLost):invalid + .ebInput-status:not(.ebInput-status_hide):not(.ebInput-status_info):not(.ebInput-status_ok):not(.ebInput-status_error) .ebInput-statusError { + display: inline-block; +} +.ebInput:not(.ebInput_validation_focusLost):invalid + .ebInput-status:not(.ebInput-status_hide):not(.ebInput-status_info):not(.ebInput-status_ok):not(.ebInput-status_error) .ebInput-statusInfo { + display: none; +} +.ebInput.ebInput_validation_focusLost:not(:focus):valid + .ebInput-status:not(.ebInput-status_hide):not(.ebInput-status_info):not(.ebInput-status_ok):not(.ebInput-status_error) .ebInput-statusOk { + display: inline-block; +} +.ebInput.ebInput_validation_focusLost:not(:focus):invalid:not(.ebInput_borderColor):not(.ebInput_status_warning):not(.ebInput_status_none) { + border-color: #e32119; +} +.ebInput.ebInput_validation_focusLost:not(:focus):invalid + .ebInput-status:not(.ebInput-status_hide):not(.ebInput-status_info):not(.ebInput-status_ok):not(.ebInput-status_error) .ebInput-statusError { + display: inline-block; +} +.ebInput.ebInput_validation_focusLost:not(:focus):invalid + .ebInput-status:not(.ebInput-status_hide):not(.ebInput-status_info):not(.ebInput-status_ok):not(.ebInput-status_error) .ebInput-statusInfo { + display: none; +} + +/* Textarea */ +.ebTextArea { + -webkit-overflow-scrolling: touch; + overflow: auto; + display: inline-block; + vertical-align: middle; + text-align: left; + font-size: 1.2rem; + width: 140px; + padding: 0.4rem 0.6rem; + margin: 0; + border: 1px solid #b3b3b3; + font-family: arial; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-radius: 3px; + box-shadow: inset 1px 1px 0 0 #cccccc; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; +} +.ebTextArea::-webkit-scrollbar { + width: 14px; + height: 14px; +} +.ebTextArea::-webkit-scrollbar-track { + background-color: #f0f0f0; + background-clip: content-box; +} +.ebTextArea::-webkit-scrollbar-thumb { + background-color: #cccccc; + border-radius: 3px; + transition: all 0.2s linear; + background-clip: content-box; +} +.ebTextArea::-webkit-scrollbar-thumb:hover { + background-color: #999999; +} +.ebTextArea::-webkit-scrollbar-button { + width: 14px; + height: 14px; + background-repeat: no-repeat; + background-color: #f0f0f0; + background-position: center; +} +.ebTextArea::-webkit-scrollbar-button:hover { + background-color: #cccccc; +} +.ebTextArea::-webkit-scrollbar-button:vertical:decrement { + background-position: center 4px; + background-image: url("data:image/svg+xml;utf8,"); + border-top-left-radius: 2px; + border-top-right-radius: 2px; +} +.ebTextArea::-webkit-scrollbar-button:vertical:increment { + background-image: url("data:image/svg+xml;utf8,"); + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; +} +.ebTextArea::-webkit-scrollbar-button:horizontal:decrement { + background-position: 4px center; + background-image: url("data:image/svg+xml;utf8,"); + border-bottom-left-radius: 2px; + border-top-left-radius: 2px; +} +.ebTextArea::-webkit-scrollbar-button:horizontal:increment { + background-image: url("data:image/svg+xml;utf8,"); + border-bottom-right-radius: 2px; + border-top-right-radius: 2px; +} +.ebTextArea_noMargin { + margin: 0; +} +.ebTextArea_txtCenter { + text-align: center; +} +.ebTextArea_miniW, +.ebTextArea_width_mini { + width: 40px; +} +.ebTextArea_smallW, +.ebTextArea_width_small { + width: 80px; +} +.ebTextArea_longW, +.ebTextArea_width_long { + width: 180px; +} +.ebTextArea_xLongW, +.ebTextArea_width_xLong { + width: 220px; +} +.ebTextArea_width_full { + min-width: 40px; + width: 100%; +} +.ebTextArea_noRightSide { + border-width: 1px 0 1px 1px; + border-radius: 3px 0 0 3px; +} +.ebTextArea_noLeftSide { + border-width: 1px 1px 1px 0; + border-radius: 0 3px 3px 0; +} +.ebTextArea:hover { + border-color: #666666; +} +.ebTextArea[readonly] { + cursor: text; + border-color: #E3E3E3; + background-color: #f0f0f0; + color: #b2b2b2; +} +.ebTextArea[readonly]:hover { + //border-color: #E3E3E3; +} +.ebTextArea_disabled, +.ebTextArea:disabled { + color: #B2B2B2; + border-color: #B2B2B2; + background-color: rgba(0, 0, 0, 0.05); + -ms-touch-action: none; + touch-action: none; + -webkit-text-fill-color: #b2b2b2; + opacity: 1; + box-shadow: inset 1px 1px 0 0 #cccccc; +} +.ebTextArea_status_none { + border-color: #b3b3b3; +} +.ebTextArea_status_warning { + border-color: #f08a00; +} +.ebTextArea_status_error { + border-color: #e32119; +} +.ebTextArea:invalid:not(.ebTextArea_status_warning):not(.ebTextArea_status_none) { + border-color: #e32119; +} + +/* Button */ +.ebBtn { + position: relative; + display: inline-block; + vertical-align: middle; + color: #333333; + background-color: #ffffff; + border: none; + min-width: 60px; + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); + border-radius: 3px; + -moz-box-sizing: border-box; + box-sizing: border-box; + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 100%); + padding: 0 8px; + height: 2.4rem; + font-size: 1.2rem; + white-space: nowrap; + text-decoration: none; + text-align: center; + cursor: pointer; +} +a.ebBtn:hover { + color: #333; +} +a.ebBtn:focus, +a.ebBtn:active, +a.ebBtn_active { + text-decoration: none; +} +.ebBtn:focus { + outline: none; + box-shadow: 0 0 2px 1px #4d90fe, 0 0 0 1px rgba(0, 0, 0, 0.2) inset; +} +.ebBtn_color_blue, +.ebBtn_color_darkBlue, +.ebBtn_color_paleBlue, +.ebBtn_color_darkGreen, +.ebBtn_color_green, +.ebBtn_color_orange, +.ebBtn_color_red, +.ebBtn_color_purple { + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%); + color: #F0F0F0 !important; +} +.ebBtn_color_blue:hover, +.ebBtn_color_darkBlue:hover, +.ebBtn_color_paleBlue:hover, +.ebBtn_color_darkGreen:hover, +.ebBtn_color_green:hover, +.ebBtn_color_orange:hover, +.ebBtn_color_red:hover, +.ebBtn_color_purple:hover { + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 100%); +} +.ebBtn_color_blue { + background-color: #0966b3; +} +.ebBtn_color_darkBlue { + background-color: #0066b3; +} +.ebBtn_color_paleBlue { + background-color: #00A9D4; +} +.ebBtn_color_darkGreen { + background-color: #00625F; +} +.ebBtn_color_green { + background-color: #89BA17; +} +.ebBtn_color_orange { + background-color: #F08A00; +} +.ebBtn_color_red { + background-color: #E32119; +} +.ebBtn_color_purple { + background-color: #953882; +} +.ebBtn_small { + font-size: 1.1rem; + padding: 0 6px; + height: 2rem; +} +.ebBtn_large { + font-size: 1.4rem; + padding: 0 10px; + height: 3.8rem; +} +.ebBtn:hover { + text-decoration: none; + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.15) 100%); +} +.ebBtn_active, +.ebBtn:active, +.ebBtn_active:hover { + text-decoration: none; + box-shadow: inset 2px 2px 2.5px 0 rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(0, 0, 0, 0.2); + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%); +} +.ebBtn:disabled, +.ebBtn_disabled, +.ebBtn:disabled:hover, +.ebBtn_disabled:hover, +.ebBtn:disabled:active, +.ebBtn_disabled:active { + -ms-touch-action: none !important; + cursor: not-allowed !important; + touch-action: none !important; + background: rgba(0, 0, 0, 0.1); + color: #8d8d8d !important; +} +.ebBtn:disabled .ebIcon, +.ebBtn_disabled .ebIcon { + opacity: 0.3; +} +.ebBtn_subtle { + background-image: none; + background-color: transparent; + box-shadow: none; + min-width: auto; +} +.ebBtn_subtle:hover { + background-image: none; + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); +} +.ebBtn_subtle:focus { + box-shadow: 0 0 2px 1px #4d90fe, 0 0 0 1px rgba(0, 0, 0, 0.2) inset; +} +.ebBtn_subtle:active, +.ebBtn_subtle.ebBtn_subtle_active { + text-decoration: none; + box-shadow: inset 2px 2px 2.5px 0 rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(0, 0, 0, 0.2); + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%); +} +.ebBtn_subtle:disabled, +.ebBtn_subtle.ebBtn_subtle_disabled, +.ebBtn_subtle:disabled:hover, +.ebBtn_subtle.ebBtn_subtle_disabled:hover, +.ebBtn_subtle:disabled:active, +.ebBtn_subtle.ebBtn_subtle_disabled:active { + background-color: transparent; + box-shadow: none; +} +.ebBtn:active:focus, +.ebBtn_active:focus { + box-shadow: inset 2px 2px 2.5px 0 rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(0, 0, 0, 0.2), 0 0 2px 1px #4d90fe; + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%); +} + +/* Combobox */ +.ebCombobox { + position: relative; + display: inline-block; + vertical-align: middle; + white-space: nowrap; + margin: 0; + padding: 0; + height: 2.4rem; +} +.ebCombobox_width_full { + min-width: 70px; + width: 100%; +} +.ebCombobox_width_full .ebInput { + width: calc(100% - 30px); +} +.ebCombobox-list, +.ebCombobox-body { + position: absolute; + margin-top: 6px; + display: none; + width: 100%; +} +.ebCombobox-list_rightAlign, +.ebCombobox-body_rightAlign { + right: 0; +} +.ebCombobox-Helper, +.ebCombobox-helper { + position: relative; + display: inline-block; + vertical-align: middle; + width: 30px; + /*height: 100%; ewwatkmi: replaced with 2.4rem below*/ + height: 2.4rem; + cursor: pointer; + border: 1px solid #999999; + background-color: #ffffff; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-radius: 0 3px 3px 0; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 100%); +} +.ebCombobox-Helper:hover, +.ebCombobox-helper:hover { + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.15) 100%); +} +.ebCombobox-Helper:active, +.ebCombobox-helper:active { + box-shadow: inset 2px 2px 3px 0 rgba(0, 0, 0, 0.35); + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%); +} +.ebCombobox-Helper:disabled, +.ebCombobox-helper:disabled { + border-color: #b2b2b2; +} +.ebCombobox-Helper:disabled, +.ebCombobox-helper:disabled, +.ebCombobox-Helper:disabled:hover, +.ebCombobox-helper:disabled:hover, +.ebCombobox-Helper:disabled:active, +.ebCombobox-helper:disabled:active { + -ms-touch-action: none !important; + cursor: not-allowed !important; + touch-action: none !important; + background: #e5e5e5; + color: #B2B2B2; + cursor: not-allowed; + box-shadow: none; +} +.ebCombobox-Helper .ebCombobox-iconHolder, +.ebCombobox-helper .ebCombobox-iconHolder { + display: inline-block; + opacity: 0.7; + cursor: pointer; + line-height: 2.2rem; +} +.ebCombobox-Helper .ebCombobox-iconHolder .ebIcon, +.ebCombobox-helper .ebCombobox-iconHolder .ebIcon { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + margin: auto; +} +.ebCombobox:hover > .ebCombobox-Helper, +.ebCombobox:hover > .ebCombobox-helper { + border-color: #666666; +} +.ebCombobox .ebInput:focus ~ .ebCombobox-list, +/*.ebCombobox .ebInput:focus ~ .ebCombobox-body,*/ +.ebCombobox:active > .ebCombobox-list, +/*.ebCombobox:active > .ebCombobox-body*/ { + display: block; +} +.ebCombobox > .ebCombobox-list, +.ebCombobox > .ebCombobox-body { + display: none; +} +.ebCombobox_noMargin { + margin: 0; +} +.ebCombobox_disabled, +.ebCombobox_disabled *:hover { + -ms-touch-action: none !important; + cursor: not-allowed !important; + touch-action: none !important; +} +.ebCombobox_disabled .ebCombobox-iconHolder, +.ebCombobox_disabled .ebCombobox-iconHolder:hover, +.ebCombobox_disabled .ebCombobox-iconHolder:active { + -ms-touch-action: none !important; + cursor: not-allowed !important; + touch-action: none !important; + opacity: 0.3; +} +.ebCombobox_disabled:hover > .ebCombobox-Helper, +.ebCombobox_disabled:hover > .ebCombobox-helper { + border-color: #b2b2b2; +} +.ebCombobox_disabled:active > .ebCombobox-list, +.ebCombobox_disabled:active > .ebCombobox-body { + display: none; +} +.ebCombobox_disabled .ebInput:focus ~ .ebCombobox-list, +.ebCombobox_disabled .ebInput:focus ~ .ebCombobox-body { + display: none; +} +.ebCombobox_status_warning .ebInput { + border-color: #f08a00; +} +.ebCombobox_status_error .ebInput { + border-color: #e32119; +} + +/* Switcher */ +.ebSwitcher { + position: relative; + height: 24px; + width: 84px; + display: block; + overflow: hidden; + cursor: pointer; + border: 1px solid #ccc; + border-radius: 3px; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + -webkit-user-select: none; + user-select: none; +} +.ebSwitcher-checkbox { + display: none; +} +.ebSwitcher-body { + position: relative; + font-size: 0; + white-space: nowrap; + top: 0; + left: 0; + width: 100%; + height: 100%; + transition: left 0.2s linear; +} +.ebSwitcher-onLabel, +.ebSwitcher-switch, +.ebSwitcher-offLabel { + display: inline-block; + vertical-align: top; + overflow: hidden; + height: 100%; +} +.ebSwitcher-onLabel, +.ebSwitcher-offLabel { + width: calc(100% - 24px); + line-height: 2.4rem; + color: white; + text-align: center; + font-size: 1.2rem; +} +.ebSwitcher-onLabel { + background-color: #89ba17; +} +.ebSwitcher-offLabel { + background-color: #999999; +} +.ebSwitcher-switch { + height: 24px; + width: 24px; + transition: left 0.2s; +} +.ebSwitcher-switch::after { + content: ""; + position: absolute; + margin: -1px; + width: 24px; + height: 24px; + display: inline-block; + background: #ffffff; + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 100%); + border-radius: 3px; + border: 1px solid rgba(0, 0, 0, 0.2); +} +.ebSwitcher-checkbox:not(:checked) + .ebSwitcher-body { + left: calc(-100% + 24px); +} +.ebSwitcher:focus { + /* + outline: #4d90fe auto 5px; + box-shadow: 0 0 0 1px #4d90fe; + -webkit-box-shadow: none; + */ + outline: none; + box-shadow: 0 0 2px 1px #4d90fe; +} +.ebSwitcher_status_warning { + border-color: #f08a00; +} +.ebSwitcher_status_error { + border-color: #e32119; +} +.ebSwitcher_disabled { + cursor: not-allowed; +} +.ebSwitcher_disabled .ebSwitcher-onLabel, +.ebSwitcher_disabled .ebSwitcher-offLabel, +.ebSwitcher_disabled .ebSwitcher-switch::after { + background-color: #e5e5e5; + background-image: none; + color: #8d8d8d; +} + +/* Dropdown */ +.ebDropdown { + position: relative; + display: inline-block; + height: 2.4rem; + padding: 0; + margin: 0; +} +.ebDropdown-list, +.ebDropdown-body { + position: absolute; + margin-top: 6px; + display: none; + min-width: 100%; +} +.ebDropdown-list_rightAlign, +.ebDropdown-body_rightAlign { + right: 0; +} +.ebDropdown-Header, +.ebDropdown-header { + position: relative; + display: inline-block; + vertical-align: middle; + height: 100%; + min-width: 60px; + margin: 0; + padding: 6px 8px; + line-height: 1.2rem; + font-size: 1.2rem; + text-align: left; + text-decoration: none; + white-space: nowrap; + color: #333333; + background-color: #ffffff; + border: none; + cursor: pointer; + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); + border-radius: 3px; + -moz-box-sizing: border-box; + box-sizing: border-box; + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 100%); +} +.ebDropdown-Header:hover, +.ebDropdown-header:hover { + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.15) 100%); +} +.ebDropdown-Header:active, +.ebDropdown-header:active { + box-shadow: inset 2px 2px 2.5px 0 rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(0, 0, 0, 0.2); + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%); +} +.ebDropdown-Header .ebDropdown-caption, +.ebDropdown-header .ebDropdown-caption { + display: inline-block; + padding: 0 4px 0 0; + vertical-align: middle; + min-width: 27px; +} +.ebDropdown-Header .ebDropdown-iconHolder, +.ebDropdown-header .ebDropdown-iconHolder { + display: inline-block; + cursor: pointer; + opacity: 0.7; +} +.ebDropdown .ebDropdown-Header:focus + .ebDropdown-list, +.ebDropdown .ebDropdown-header:focus + .ebDropdown-body, +.ebDropdown .ebDropdown-Header:active + .ebDropdown-list, +.ebDropdown .ebDropdown-header:active + .ebDropdown-body, +.ebDropdown:focus > .ebDropdown-list, +.ebDropdown:focus > .ebDropdown-body, +.ebDropdown:active > .ebDropdown-list, +.ebDropdown:active > .ebDropdown-body { + display: block; +} +.ebDropdown_disabled .ebDropdown-Header, +.ebDropdown_disabled .ebDropdown-header { + background: rgba(0, 0, 0, 0.1); + color: #B2B2B2; +} +.ebDropdown_disabled .ebDropdown-Header, +.ebDropdown_disabled .ebDropdown-header, +.ebDropdown_disabled .ebDropdown-Header:hover, +.ebDropdown_disabled .ebDropdown-header:hover, +.ebDropdown_disabled .ebDropdown-Header:active, +.ebDropdown_disabled .ebDropdown-header:active { + -ms-touch-action: none !important; + cursor: not-allowed !important; + touch-action: none !important; +} +.ebDropdown_disabled .ebDropdown-Header:hover, +.ebDropdown_disabled .ebDropdown-header:hover, +.ebDropdown_disabled .ebDropdown-Header:active, +.ebDropdown_disabled .ebDropdown-header:active { + background: rgba(0, 0, 0, 0.1); + color: #B2B2B2; + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); +} +.ebDropdown_disabled .ebDropdown-Header .ebDropdown-iconHolder, +.ebDropdown_disabled .ebDropdown-header .ebDropdown-iconHolder, +.ebDropdown_disabled .ebDropdown-Header .ebDropdown-iconHolder:hover, +.ebDropdown_disabled .ebDropdown-header .ebDropdown-iconHolder:hover, +.ebDropdown_disabled .ebDropdown-Header .ebDropdown-iconHolder:active, +.ebDropdown_disabled .ebDropdown-header .ebDropdown-iconHolder:active { + -ms-touch-action: none !important; + cursor: not-allowed !important; + touch-action: none !important; + opacity: 0.3; +} +.ebDropdown_disabled .ebDropdown-Header:focus + .ebDropdown-list, +.ebDropdown_disabled .ebDropdown-header:focus + .ebDropdown-body, +.ebDropdown_disabled .ebDropdown-Header:active + .ebDropdown-list, +.ebDropdown_disabled .ebDropdown-header:active + .ebDropdown-body, +.ebDropdown_disabled:focus > .ebDropdown-list, +.ebDropdown_disabled:focus > .ebDropdown-body, +.ebDropdown_disabled:active > .ebDropdown-list, +.ebDropdown_disabled:active > .ebDropdown-body { + display: none; +} + +/* Icons */ +.ebIcon { + display: inline-block; + vertical-align: middle; + border: none; + height: 16px; + width: 16px; + line-height: 1.6rem; + background-repeat: no-repeat; + background-position: center; + background-color: transparent; + background-size: 100%; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + -webkit-user-select: none; + user-select: none; + /*small icons */ + /*16px icons*/ +} +.ebIcon_interactive { + opacity: 0.7; + cursor: pointer; +} +.ebIcon_interactive:hover { + opacity: 1.0; +} +.ebIcon_interactive:active { + opacity: 0.4; +} +.ebIcon_button { + margin: 10px; +} +.ebIcon_noVertAlign { + vertical-align: inherit; +} +.ebIcon_disabled { + cursor: default; +} +.ebIcon_disabled, +.ebIcon_disabled:hover, +.ebIcon_disabled:active { + opacity: 0.3; +} +.ebIcon_small { + width: 1rem; + height: 1rem; + line-height: 1rem; +} +.ebIcon_big { + width: 2rem; + height: 2rem; + line-height: 2rem; +} +.ebIcon_large { + width: 2.8rem; + height: 2.8rem; + line-height: 2.8rem; +} +.ebIcon_wMargin { + margin: 4px; +} +.ebIcon_upArrow { + background-image: url('../resources/16px/ArrowUpSmall_black_16px.svg'); +} +.ebIcon_upArrow_white { + background-image: url('../resources/16px/arrowUpSmall_white_16px.svg'); +} +.ebIcon_downArrow { + background-image: url('../resources/16px/ArrowDownSmall_black_16px.svg'); +} +.ebIcon_downArrow_white { + background-image: url('../resources/16px/ArrowDownSmall_white_16px.svg'); +} +.ebIcon_leftArrow { + background-image: url('../resources/16px/ArrowLeftSmall_black_16px.svg'); +} +.ebIcon_leftArrow_white { + background-image: url('../resources/16px/ArrowLeftSmall_white_16px.svg'); +} +.ebIcon_rightArrow { + background-image: url('../resources/16px/ArrowRightSmall_black_16px.svg'); +} +.ebIcon_rightArrow_white { + background-image: url('../resources/16px/ArrowRightSmall_white_16px.svg'); +} +.ebIcon_prevArrow { + background-image: url('../resources/16px/ArrowDoubleLeftSmall_black_16px.svg'); +} +.ebIcon_nextArrow { + background-image: url('../resources/16px/ArrowDoubleRightSmall_black_16px.svg'); +} +.ebIcon_upArrow_10px { + background-image: url('../resources/10px/ArrowUpSmall_black_10px.svg'); +} +.ebIcon_downArrow_10px { + background-image: url('../resources/10px/ArrowDownSmall_black_10px.svg'); +} +.ebIcon_leftArrow_10px { + background-image: url('../resources/10px/ArrowLeftSmall_black_10px.svg'); +} +.ebIcon_rightArrow_10px { + background-image: url('../resources/10px/ArrowRightSmall_black_10px.svg'); +} +.ebIcon_prevArrow_10px { + background-image: url('../resources/10px/ArrowDoubleLeftSmall_black_10px.svg'); +} +.ebIcon_nextArrow_10px { + background-image: url('../resources/10px/ArrowDoubleRightSmall_black_10px.svg'); +} +.ebIcon_errorSmall { + background-image: url('../resources/other/errorSmall_red_10px.svg'); +} +.ebIcon_tickSmallBlack { + background-image: url('../resources/other/tick_black_10x8px.svg'); +} +.ebIcon_tickSmallGreen { + background-image: url('../resources/other/tick_green_10x8px.svg'); +} +.ebIcon_upArrowLarge { + background-image: url('../resources/16px/ArrowUp_black_16px.svg'); +} +.ebIcon_upArrowLarge_white { + background-image: url('../resources/16px/ArrowUp_white_16px.svg'); +} +.ebIcon_downArrowLarge { + background-image: url('../resources/16px/ArrowDown_black_16px.svg'); +} +.ebIcon_downArrowLarge_white { + background-image: url('../resources/16px/ArrowDown_white_16px.svg'); +} +.ebIcon_downArrowLarge_blue { + background-image: url('../resources/16px/ArrowDown_blue_16px.svg'); +} +.ebIcon_leftArrowLarge { + background-image: url('../resources/16px/ArrowLeft_black_16px.svg'); +} +.ebIcon_leftArrowLarge_white { + background-image: url('../resources/16px/ArrowLeft_white_16px.svg'); +} +.ebIcon_rightArrowLarge { + background-image: url('../resources/16px/ArrowRight_black_16px.svg'); +} +.ebIcon_rightArrowLarge_white { + background-image: url('../resources/16px/ArrowRight_white_16px.svg'); +} +.ebIcon_circleArrowDown { + background-image: url('../resources/16px/circleArrowDown_black_16px.svg'); +} +.ebIcon_circleArrowDown_white { + background-image: url('../resources/16px/circleArrowDown_white_16px.svg'); +} +.ebIcon_circleArrowLeft { + background-image: url('../resources/16px/circleArrowLeft_black_16px.svg'); +} +.ebIcon_circleArrowLeft_white { + background-image: url('../resources/16px/circleArrowLeft_white_16px.svg'); +} +.ebIcon_circleArrowRight { + background-image: url('../resources/16px/circleArrowRight_black_16px.svg'); +} +.ebIcon_circleArrowRight_white { + background-image: url('../resources/16px/circleArrowRight_white_16px.svg'); +} +.ebIcon_circleArrowUp { + background-image: url('../resources/16px/circleArrowUp_black_16px.svg'); +} +.ebIcon_circleArrowUp_white { + background-image: url('../resources/16px/circleArrowUp_white_16px.svg'); +} +.ebIcon_circleCaretDown { + background-image: url('../resources/16px/circleCaretDown_black_16px.svg'); +} +.ebIcon_circleCaretDown_white { + background-image: url('../resources/16px/circleCaretDown_white_16px.svg'); +} +.ebIcon_circleCaretLeft { + background-image: url('../resources/16px/circleCaretLeft_black_16px.svg'); +} +.ebIcon_circleCaretLeft_white { + background-image: url('../resources/16px/circleCaretLeft_white_16px.svg'); +} +.ebIcon_circleCaretRight { + background-image: url('../resources/16px/circleCaretRight_black_16px.svg'); +} +.ebIcon_circleCaretRight_white { + background-image: url('../resources/16px/circleCaretRight_white_16px.svg'); +} +.ebIcon_circleCaretUp { + background-image: url('../resources/16px/circleCaretUp_black_16px.svg'); +} +.ebIcon_circleCaretUp_white { + background-image: url('../resources/16px/circleCaretUp_white_16px.svg'); +} +.ebIcon_eLogo { + background-image: url('../resources/systemBar/econ01.svg'); +} +.ebIcon_comment { + background-image: url('../resources/16px/Comment_black_16px.svg'); +} +.ebIcon_comment_white { + background-image: url('../resources/16px/comment_white.svg'); +} +.ebIcon_copy { + background-image: url('../resources/16px/copy_black_16px.svg'); +} +.ebIcon_copy_white { + background-image: url('../resources/16px/copy_white_16px.svg'); +} +.ebIcon_cut { + background-image: url('../resources/16px/cut_black.svg'); +} +.ebIcon_cut_white { + background-image: url('../resources/16px/cut_white.svg'); +} +.ebIcon_delete { + background-image: url('../resources/16px/delete_black_16px.svg'); +} +.ebIcon_delete_white { + background-image: url('../resources/16px/delete_white_16px.svg'); +} +.ebIcon_duplicate { + background-image: url('../resources/16px/duplicate_black_16px.svg'); +} +.ebIcon_duplicate_white { + background-image: url('../resources/16px/duplicate_white_16px.svg'); +} +.ebIcon_edit { + background-image: url('../resources/16px/edit_black_16px.svg'); +} +.ebIcon_editWhite { + background-image: url('../resources/16px/edit_white_16px.svg'); +} +.ebIcon_newFile { + background-image: url('../resources/16px/newFile_black_16px.svg'); +} +.ebIcon_newFile_white { + background-image: url('../resources/16px/newFile_white_16px.svg'); +} +.ebIcon_save { + background-image: url('../resources/16px/save_black_16px.svg'); +} +.ebIcon_save_white { + background-size: contain; + background-image: url('../resources/16px/save_white.svg'); +} +.ebIcon_filter { + background-image: url('../resources/16px/filter_black_16px.svg'); +} +.ebIcon_filterOn { + background-image: url('../resources/16px/filters_on.svg'); +} +.ebIcon_filterOff { + background-image: url('../resources/16px/filters_off.svg'); +} +.ebIcon_filter_white { + background-image: url('../resources/16px/filter_white_16px.svg'); +} +.ebIcon_folder { + background-image: url('../resources/16px/folder_black_16px.svg'); +} +.ebIcon_folder_white { + background-image: url('../resources/16px/folder_white_16px.svg'); +} +.ebIcon_folderClosed { + background-image: url('../resources/16px/folderClosed_black.svg'); +} +.ebIcon_folderClosed_white { + background-image: url('../resources/16px/folderClosed_white.svg'); +} +.ebIcon_detach { + background-image: url('../resources/16px/detach_black_16px.svg'); +} +.ebIcon_detach_white { + background-size: contain; + background-image: url('../resources/16px/detach_white.svg'); +} +.ebIcon_import { + background-image: url('../resources/16px/import_black.svg'); +} +.ebIcon_import_white { + background-image: url('../resources/16px/import_white.svg'); +} +.ebIcon_export { + background-image: url('../resources/16px/export_black_16px.svg'); +} +.ebIcon_export_white { + background-image: url('../resources/16px/export_white.svg'); +} +.ebIcon_undo { + background-image: url('../resources/16px/undo_black_16px.svg'); +} +.ebIcon_undo_white { + background-image: url('../resources/16px/undo_white_16px.svg'); +} +.ebIcon_cancelled { + background-image: url('../resources/16px/Cancelled_Black_16px.svg'); +} +.ebIcon_draft { + background-size: contain; + background-image: url('../resources/16px/draft.svg'); +} +.ebIcon_importExport { + background-image: url('../resources/16px/import_export.svg'); +} +.ebIcon_login { + background-image: url('../resources/16px/login.svg'); +} +.ebIcon_move { + background-image: url('../resources/16px/move.svg'); +} +.ebIcon_remove { + background-image: url('../resources/16px/remove.svg'); +} +.ebIcon_valid { + background-image: url('../resources/16px/valid_icon.svg'); +} +.ebIcon_invalid { + background-image: url('../resources/16px/invalid_icon.svg'); +} +.ebIcon_error { + background-image: url('../resources/16px/error_red_16px.svg'); +} +.ebIcon_warning { + background-image: url('../resources/16px/warning_yellow_16px.svg'); +} +.ebIcon_warningOrange { + background-image: url('../resources/16px/warning_orange_16px.svg'); +} +.ebIcon_warning_white { + background-image: url('../resources/16px/warning_white.svg'); +} +.ebIcon_warningShield { + background-image: url('../resources/16px/warningShield_black_16px.svg'); +} +.ebIcon_warningShield_white { + background-size: contain; + background-image: url('../resources/16px/warningShield_white.svg'); +} +.ebIcon_mail { + background-image: url('../resources/16px/mail_black_16px.svg'); +} +.ebIcon_mail_white { + background-image: url('../resources/16px/mail_white_16px.svg'); +} +.ebIcon_mailRead { + background-image: url('../resources/16px/mailRead_black_16px.svg'); +} +.ebIcon_mailRead_white { + background-image: url('../resources/16px/mailRead_white_16px.svg'); +} +.ebIcon_link { + background-image: url('../resources/16px/Link_black_16px.svg');; +} +.ebIcon_lock { + background-image: url('../resources/16px/lock_black_16px.svg'); +} +.ebIcon_lock_white { + background-image: url('../resources/16px/lock_white_16px.svg'); +} +.ebIcon_unlock { + background-image: url('../resources/16px/unlock_black_16px.svg'); +} +.ebIcon_unlock_white { + background-image: url('../resources/16px/unlock_white_16px.svg'); +} +.ebIcon_logout { + background-image: url('../resources/16px/logout_black_16px.svg'); +} +.ebIcon_menu { + background-image: url('../resources/16px/menu_black_16px.svg'); +} +.ebIcon_menu_white { + background-image: url('../resources/16px/menu_white_16px.svg'); +} +.ebIcon_search { + background-image: url('../resources/16px/search_black_16px.svg'); +} +.ebIcon_searchWhite { + background-image: url('../resources/16px/search_white_16px.svg'); +} +.ebIcon_advancedSearch { + background-image: url('../resources/16px/advanced_search_black_16px.svg'); +} +.ebIcon_advancedSearchWhite { + background-image: url('../resources/16px/advanced_search_white_16px.svg'); +} +.ebIcon_share { + background-image: url('../resources/16px/share_black_16px.svg'); +} +.ebIcon_share_white { + background-image: url('../resources/16px/share_white.svg'); +} +.ebIcon_star { + background-image: url('../resources/16px/star_black_16px.svg'); +} +.ebIcon_star_white { + background-image: url('../resources/16px/star_white_16px.svg'); +} +.ebIcon_star_yellow { + background-image: url('../resources/16px/star_yellow_16px.svg'); +} +.ebIcon_starOutline { + background-image: url('../resources/16px/star_outline_black_16px.svg'); +} +.ebIcon_starOutline_white { + background-image: url('../resources/16px/star_outline_white_16px.svg'); +} +.ebIcon_starOutline_yellow { + background-image: url('../resources/16px/star_outline_yellow_16px.svg'); +} +.ebIcon_tick { + background-image: url('../resources/16px/tick_green_16px.svg'); +} +.ebIcon_tick_black { + background-image: url('../resources/16px/tick_16px.svg'); +} +.ebIcon_simpleGreenTick { + background-image: url('../resources/16px/simple_green_tick.svg'); +} +.ebIcon_simpleTick_black { + background-image: url('../resources/16px/simple_tick.svg'); +} +.ebIcon_download { + background-image: url('../resources/16px/download_black.svg'); +} +.ebIcon_download_white { + background-image: url('../resources/16px/download_white.svg'); +} +.ebIcon_downloadWhite { + background-image: url('../resources/16px/download_white_16px.svg'); +} +.ebIcon_documentWhite { + background-image: url('../resources/16px/document_white_16px.svg'); +} +.ebIcon_expand { + background-image: url('../resources/16px/expand_black_16px.svg'); +} +.ebIcon_rowCollapsed { + background-image: url('../resources/16px/rowCollapsed_black_16px.svg'); +} +.ebIcon_rowExpanded { + background-image: url('../resources/16px/rowExpanded_black_16px.svg'); +} +.ebIcon_rowView { + background-image: url('../resources/16px/rowView_black_16px.svg'); +} +.ebIcon_rowView_white { + background-image: url('../resources/16px/rowView_white.svg'); +} +.ebIcon_externalApp { + background-image: url('../resources/16px/externalApp_black_16px.svg'); +} +.ebIcon_externalApp_white { + background-image: url('../resources/16px/externalApp_white_16px.svg'); +} +.ebIcon_fullscreen { + background-image: url('../resources/16px/fullscreen_black_16px.svg'); +} +.ebIcon_fullscreenMinimize { + background-image: url('../resources/16px/fullscreenMinimise_black_16px.svg'); +} +.ebIcon_help { + background-image: url('../resources/16px/help_black_16px.svg'); +} +.ebIcon_help_white { + background-image: url('../resources/16px/help_white.svg'); +} +.ebIcon_info { + background-image: url('../resources/16px/info_black.svg'); +} +.ebIcon_info_white { + background-image: url('../resources/16px/info_white.svg'); +} +.ebIcon_dialogInfo { + background-image: url('../resources/16px/dialogInfo_blue.svg'); +} +.ebIcon_dialogInfo_white { + background-image: url('../resources/16px/dialogInfo_white.svg'); +} +.ebIcon_infoMsgIndicator { + background-image: url('../resources/16px/infoMsgIndicator_16px.svg'); +} +.ebIcon_exitFullscreen { + background-image: url('../resources/16px/minimiseFullscreen_black_16px.svg'); +} +.ebIcon_refresh { + background-image: url('../resources/16px/refresh_black_16px.svg'); +} +.ebIcon_refresh_white { + background-image: url('../resources/16px/refresh_white_16px.svg'); +} +.ebIcon_settings { + background-image: url('../resources/16px/settings_black_16px.svg'); +} +.ebIcon_settings_white { + background-image: url('../resources/16px/settings_white_16px.svg'); +} +.ebIcon_user { + background-image: url('../resources/16px/user_black_16px.svg'); +} +.ebIcon_user_white { + background-image: url('../resources/16px/user_white_16px.svg'); +} +.ebIcon_close { + background-image: url('../resources/16px/X_black_16px.svg'); +} +.ebIcon_close_white { + background-image: url('../resources/16px/close_white_16px.svg'); +} +.ebIcon_close_blue { + background-image: url('../resources/16px/X_blue_16px.svg'); +} +.ebIcon_close_paleBlue { + background-image: url('../resources/16px/X_paleBlue_16px.svg'); +} +.ebIcon_close_green { + background-image: url('../resources/16px/X_green_16px.svg'); +} +.ebIcon_close_orange { + background-image: url('../resources/16px/X_orange_16px.svg'); +} +.ebIcon_close_red { + background-image: url('../resources/16px/X_red_16px.svg'); +} +.ebIcon_close_yellow { + background-image: url('../resources/16px/X_yellow_16px.svg'); +} +.ebIcon_minus { + background-image: url('../resources/16px/minus_black_16px.svg'); +} +.ebIcon_plus { + background-image: url('../resources/16px/plus_black_16px.svg'); +} +.ebIcon_add { + background-image: url('../resources/16px/add_black_16px.svg'); +} +.ebIcon_add_white { + background-image: url('../resources/16px/add_white_16px.svg'); +} +.ebIcon_multiSelect { + background-image: url('../resources/16px/multiSelect_black_16px.svg'); +} +.ebIcon_multiSelect_white { + background-size: contain; + background-image: url('../resources/16px/multiSelect_white.svg'); +} +.ebIcon_multiSort { + background-image: url('../resources/16px/multi-sort.svg'); +} +.ebIcon_multiSort_white { + background-image: url('../resources/16px/multi-sort_white.svg'); +} +.ebIcon_sort { + background-image: url('../resources/16px/sort.svg'); +} +.ebIcon_sort_white { + background-image: url('../resources/16px/sort_white.svg'); +} +.ebIcon_stop { + background-image: url('../resources/16px/stop_black_16px.svg'); +} +.ebIcon_pause { + background-image: url('../resources/16px/pause_black_16px.svg'); +} +.ebIcon_suspend { + background-image: url('../resources/16px/suspend_black_16px.svg'); +} +.ebIcon_resume { + background-image: url('../resources/16px/resume_black_16px.svg'); +} +.ebIcon_play { + background-image: url('../resources/16px/play_black_16px.svg'); +} +.ebIcon_fastForward { + background-image: url('../resources/16px/fastForward_black_16px.svg'); +} +.ebIcon_fastRewind { + background-image: url('../resources/16px/fastRewind_black_16px.svg'); +} +.ebIcon_print { + background-image: url('../resources/16px/print_black_16px.svg'); +} +.ebIcon_print_white { + background-image: url('../resources/16px/print_white_16px.svg'); +} +.ebIcon_calendar { + background-image: url('../resources/16px/calendar_black_16px.svg'); +} +.ebIcon_calendar_white { + background-image: url('../resources/16px/calendar_white_16px.svg'); +} +.ebIcon_addToFolder { + background-image: url('../resources/16px/addToFolder_black.svg'); +} +.ebIcon_addToFolder_white { + background-image: url('../resources/16px/addToFolder_white.svg'); +} +.ebIcon_alarmCleared { + background-image: url('../resources/16px/alarmCleared_16px.svg'); +} +.ebIcon_alarmCleared_white { + background-image: url('../resources/16px/alarmCleared_white_16px.svg'); +} +.ebIcon_alarmCritical { + background-image: url('../resources/16px/alarmCritical_16px.svg'); +} +.ebIcon_alarmCritical_white { + background-image: url('../resources/16px/alarmCritical_white_16px.svg'); +} +.ebIcon_alarmHeartbeat { + background-image: url('../resources/16px/alarmHeartbeat_16px.svg'); +} +.ebIcon_alarmIndeterminate { + background-image: url('../resources/16px/alarmIndeterminate_16px.svg'); +} +.ebIcon_alarmIndeterminate_white { + background-image: url('../resources/16px/alarmIndeterminate_white_16px.svg'); +} +.ebIcon_alarmMajor { + background-image: url('../resources/16px/alarmMajor_16px.svg'); +} +.ebIcon_alarmMajor_white { + background-image: url('../resources/16px/alarmMajor_white_16px.svg'); +} +.ebIcon_alarmMinor { + background-image: url('../resources/16px/alarmMinor_16px.svg'); +} +.ebIcon_alarmMinor_white { + background-image: url('../resources/16px/alarmMinor_white_16px.svg'); +} +.ebIcon_alarmWarning { + background-image: url('../resources/16px/alarmWarning_16px.svg'); +} +.ebIcon_alarmWarning_white { + background-image: url('../resources/16px/alarmWarning_white_16px.svg'); +} +.ebIcon_alarmOtherGrouping { + background-image: url('../resources/16px/alarmOtherGrouping_16px.svg'); +} +.ebIcon_alarmUnacknowledged { + background-image: url('../resources/16px/alarmUnacknowledged.svg'); +} +.ebIcon_alarmUnacknowledged_white { + background-image: url('../resources/16px/alarmUnacknowledged_white.svg'); +} +.ebIcon_alarmUnspecified { + background-image: url('../resources/16px/alarmUnspecified_16px.svg'); +} +.ebIcon_acknowledgeAlarm { + background-image: url('../resources/16px/acknowledgeAlarm.svg'); +} +.ebIcon_acknowledgeAlarm_white { + background-image: url('../resources/16px/acknowledgeAlarm_white.svg'); +} +.ebIcon_clearAlarm { + background-image: url('../resources/16px/clearAlarm.svg'); +} +.ebIcon_clearAlarm_white { + background-image: url('../resources/16px/clearAlarm_white.svg'); +} +.ebIcon_bsc { + background-image: url('../resources/16px/BSC_black_16px.svg'); +} +.ebIcon_bscYellow { + background-image: url('../resources/16px/BSC_Yellow_16px.svg'); +} +.ebIcon_bscFunction { + background-image: url('../resources/16px/BSCFunction_black_16px.svg'); +} +.ebIcon_bscFunctionYellow { + background-image: url('../resources/16px/BSCFunction_Yellow_16px.svg'); +} +.ebIcon_cabinet { + background-image: url('../resources/16px/cabinet_black_16px.svg'); +} +.ebIcon_cellGray { + background-image: url('../resources/16px/cell_gray_16px.svg'); +} +.ebIcon_cellGreen { + background-image: url('../resources/16px/cell_green_16px.svg'); +} +.ebIcon_cellRed { + background-image: url('../resources/16px/cell_red_16px.svg'); +} +.ebIcon_cellAdjacent { + background-image: url('../resources/16px/cellAdjacent_16px.svg'); +} +.ebIcon_cellExternal { + background-image: url('../resources/16px/cellExternal_16px.svg'); +} +.ebIcon_charging { + background-image: url('../resources/16px/charging_black.svg'); +} +.ebIcon_charging_white { + background-size: contain; + background-image: url('../resources/16px/charging_white.svg'); +} +.ebIcon_connected { + background-image: url('../resources/16px/connected_black_16px.svg'); +} +.ebIcon_disconnected { + background-image: url('../resources/16px/disconnected_black_16px.svg'); +} +.ebIcon_connectionError { + background-image: url('../resources/16px/connectionError_black_16px.svg'); +} +.ebIcon_core { + background-image: url('../resources/16px/core_black_16px.svg'); +} +.ebIcon_coreSubscriber { + background-image: url('../resources/16px/coreSubscriber_black_16px.svg'); +} +.ebIcon_database { + background-image: url('../resources/16px/database_black_16px.svg'); +} +.ebIcon_ftpServer { + background-image: url('../resources/16px/ftpServer_black_16px.svg'); +} +.ebIcon_ftpServerFunction { + background-image: url('../resources/16px/ftpServerFunction_black_16px.svg'); +} +.ebIcon_gatewayFunction { + background-image: url('../resources/16px/gatewayFunction_black_16px.svg'); +} +.ebIcon_grabHandle { + background-image: url('../resources/16px/grabHandle_black_16px.svg'); +} +.ebIcon_grabHandle_white { + background-size: contain; + background-image: url('../resources/16px/grabHandle_white.svg'); +} +.ebIcon_managedFunction { + background-image: url('../resources/16px/managedFunction_black_16px.svg'); +} +.ebIcon_managedGroup { + background-image: url('../resources/16px/managedGroup_black_16px.svg'); +} +.ebIcon_managementNode { + background-image: url('../resources/16px/managementNode_black_16px.svg'); +} +.ebIcon_network { + background-image: url('../resources/16px/network_black_16px.svg'); +} +.ebIcon_networkElement { + background-image: url('../resources/16px/networkElement_black_16px.svg'); +} +.ebIcon_networkElement_white { + background-image: url('../resources/16px/networkElement_white_16px.svg'); +} +.ebIcon_rbs { + background-image: url('../resources/16px/RBS_black_16px.svg'); +} +.ebIcon_rbs_white { + background-image: url('../resources/16px/RBS_white_16px.svg'); +} +.ebIcon_routeSwitch { + background-image: url('../resources/16px/routeSwitch.svg'); +} +.ebIcon_rxi { + background-image: url('../resources/16px/rxi_black_16px.svg'); +} +.ebIcon_switchFunction { + background-image: url('../resources/16px/switchFunction_black_16px.svg'); +} +.ebIcon_technicianPresent { + background-image: url('../resources/16px/technicianPresent_16px.svg'); +} +.ebIcon_terminal { + background-image: url('../resources/16px/terminal_black_16px.svg'); +} +.ebIcon_topology { + background-image: url('../resources/16px/topology_black_16px.svg'); +} +.ebIcon_access { + background-image: url('../resources/16px/access_black_16px.svg'); +} +.ebIcon_access_white { + background-image: url('../resources/16px/access_white_16px.svg'); +} +.ebIcon_accessSettings { + background-image: url('../resources/16px/accessSettings_black_16px.svg'); +} +.ebIcon_accessSettings_white { + background-image: url('../resources/16px/accessSettings_white_16px.svg'); +} +.ebIcon_alignCenter { + background-image: url('../resources/16px/alignCenter_black_16px.svg'); +} +.ebIcon_alignCenter_white { + background-image: url('../resources/16px/alignCenter_white.svg'); +} +.ebIcon_alignLeft { + background-image: url('../resources/16px/alignLeft_black_16px.svg'); +} +.ebIcon_alignLeft_white { + background-image: url('../resources/16px/alignLeft_white.svg'); +} +.ebIcon_alignRight { + background-image: url('../resources/16px/alignRight_black_16px.svg'); +} +.ebIcon_alignRight_white { + background-image: url('../resources/16px/alignRight_white.svg'); +} +.ebIcon_cli { + background-image: url('../resources/16px/CommandLineInterface_black_16px.svg'); +} +.ebIcon_cli_white { + background-image: url('../resources/16px/CommandLineInterface_white_16px.svg'); +} +.ebIcon_controllingNode { + background-image: url('../resources/16px/controllingNode.svg'); +} +.ebIcon_grid3x3 { + background-image: url('../resources/16px/grid3X3_black_16px.svg'); +} +.ebIcon_grid3x3_white { + background-image: url('../resources/16px/grid3x3_white.svg'); +} +.ebIcon_grid4x4 { + background-image: url('../resources/16px/grid4X4_black_16px.svg'); +} +.ebIcon_grid4x4_white { + background-image: url('../resources/16px/grid4x4_white.svg'); +} +.ebIcon_gridView { + background-image: url('../resources/16px/gridView_black_16px.svg'); +} +.ebIcon_gridView_white { + background-image: url('../resources/16px/gridView_white.svg'); +} +.ebIcon_jumpTo { + background-image: url('../resources/16px/jumpTo_black_16px.svg'); +} +.ebIcon_microwave { + background-image: url('../resources/16px/microwave.svg'); +} +.ebIcon_mo { + background-image: url('../resources/16px/mo.svg'); +} +.ebIcon_security { + background-image: url('../resources/16px/security_black_16px.svg'); +} +.ebIcon_security_white { + background-image: url('../resources/16px/security_white_16px.svg'); +} +.ebIcon_site { + background-image: url('../resources/16px/site_black_16px.svg'); +} +.ebIcon_siteManager { + background-image: url('../resources/16px/siteManager_black_16px.svg'); +} +.ebIcon_subnetwork { + background-image: url('../resources/16px/subnetwork.svg'); +} +.ebIcon_gateway, +.ebIcon_switch { + background-image: url('../resources/16px/switch.svg'); +} +.ebIcon_tip { + background-image: url('../resources/16px/tip_black_16px.svg'); +} +.ebIcon_tip_white { + background-image: url('../resources/16px/tip_white_16px.svg'); +} +.ebIcon_attach { + background-image: url('../resources/16px/attach_black_16px.svg'); +} +.ebIcon_attach_white { + background-size: contain; + background-image: url('../resources/16px/attach_white.svg'); +} +.ebIcon_clock { + background-image: url('../resources/16px/clock_black_16px.svg'); +} +.ebIcon_clock_white { + background-image: url('../resources/16px/clock_white_16px.svg'); +} +.ebIcon_windowMaximize { + background-image: url('../resources/16px/WindowMaximize_black_16px.svg'); +} +.ebIcon_windowMinimize { + background-image: url('../resources/16px/WindowMinimize_black_16px.svg'); +} +.ebIcon_deprecated { + background-image: url('../resources/16px/deprecated_16px.svg'); +} +.ebIcon_obsolete { + background-image: url('../resources/16px/obsolete_16px.svg'); +} +.ebIcon_newStatus_blue { + background-image: url('../resources/16px/newStatus_blue_16px.svg'); +} +.ebIcon_newStatus_green { + background-image: url('../resources/16px/newStatus_green_16px.svg'); +} +.ebIcon_upload { + background-image: url('../resources/16px/upload_black_16px.svg'); +} +.ebIcon_activate { + background-image: url('../resources/16px/activate_black_16px.svg'); +} +.ebIcon_activate_white { + background-size: contain; + background-image: url('../resources/16px/activate_white.svg'); +} +.ebIcon_deactivate { + background-image: url('../resources/16px/deactivate_black_16px.svg'); +} +.ebIcon_deactivate_white { + background-size: contain; + background-image: url('../resources/16px/deactivate_white.svg'); +} +.ebIcon_switchBetween { + background-image: url('../resources/16px/switchBetween_black_16px.svg'); +} +.ebIcon_switchBetween_white { + background-image: url('../resources/16px/switchBetween_white_16px.svg'); +} +.ebIcon_eye { + background-image: url('../resources/16px/eye_black_16px.svg'); +} +.ebIcon_eye_white { + background-image: url('../resources/16px/eye_white_16px.svg'); +} +.ebIcon_eyeLine { + background-image: url('../resources/16px/eyeLine_black_16px.svg'); +} +.ebIcon_eyeLine_white { + background-image: url('../resources/16px/eyeLine_white.svg'); +} +.ebIcon_activityTray { + background-image: url('../resources/16px/activity_16px_black.svg'); +} +.ebIcon_note { + background-image: url('../resources/16px/note_black_16px.svg'); + background-size: contain; +} +.ebIcon_note_white { + background-image: url('../resources/16px/note_white_16px.svg'); +} +.ebIcon_tableView { + background-image: url('../resources/16px/tableView_black_16px.svg'); +} +.ebIcon_tableView_white { + background-image: url('../resources/16px/tableView_white_16px.svg'); +} +.ebIcon_synced { + background-image: url('../resources/16px/Syncd_16px.svg'); +} +.ebIcon_syncError { + background-image: url('../resources/16px/SyncError_16px.svg'); +} +.ebIcon_syncing { + background-image: url('../resources/16px/Syncing_Static_16px.svg'); +} +.ebIcon_syncing_animated { + background-image: url('../resources/16px/Syncing_Animated_16px.svg'); +} + + +/* Breadcrumb */ +.ebBreadcrumbs { + position: relative; + display: block; + font-size: 0; + margin-top: 12px; + margin-bottom: 4px; +} +.ebBreadcrumbs-link { + font-size: 1.2rem; + vertical-align: middle; + display: inline-block +} +.ebBreadcrumbs-list { + position: absolute; + left: 0; + margin-top: 6px; + display: none; + min-width: calc(100% - 16px); + max-width: 250px; + z-index: 1500 +} +.ebBreadcrumbs-arrow { + margin-left: .6rem; + vertical-align: middle; + outline: none; + display: inline-block; + line-height: 12px +} +.ebBreadcrumbs-arrow:focus>* { + opacity: 1 +} +.ebBreadcrumbs-arrow_hidden { + display: none +} +.ebBreadcrumbs-arrow:focus+.ebBreadcrumbs-list { + display: block +} +.ebBreadcrumbs-item { + position: relative; + font-size: 0; + white-space: nowrap; + display: inline-block; + margin-bottom: .8rem +} +.ebBreadcrumbs-item:after { + vertical-align: middle; + display: inline-block; + width: 20px; + content: "/"; + font-size: 1.6rem; + text-align: center; + color: #999; + cursor: default !important; + pointer-events: none !important; + -ms-touch-action: none !important; + touch-action: none !important; + -khtml-user-select: none !important; + -moz-user-select: none !important; + -o-user-select: none !important; + -webkit-user-select: none !important; + user-select: none +} +.ebBreadcrumbs-item:last-child { + margin-right: 0 +} +.ebBreadcrumbs-item:last-child>.ebBreadcrumbs-link { + -ms-touch-action: none !important; + touch-action: none !important; + -khtml-user-select: none !important; + -moz-user-select: none !important; + -o-user-select: none !important; + -webkit-user-select: none !important; + user-select: none +} +.ebBreadcrumbs-item:last-child:after { + content: ""; + padding: 0; + font-size: 0; + width: 0; +} + +.ebBreadcrumbs a { + font-size: 1.2rem; + color: #0066b3; + text-decoration: none; +} +.ebBreadcrumbs a:hover { + text-decoration: underline; + outline: none; +} +.ebBreadcrumbs a:active { + text-decoration: underline +} +.ebBreadcrumbs a:focus { + outline: none; + text-decoration: underline; + box-shadow: none; +} + +.title { + padding: 0px; +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/showhideTextarea.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/showhideTextarea.css new file mode 100644 index 0000000..86da161 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/showhideTextarea.css @@ -0,0 +1,134 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +/* the div */ +.showHideTextarea{ +} + +/* the textarea */ +.showHideTextarea_hidden +{ + display: none; + width: 100%; + font-size: 15px; + height: 300px; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + border: 1px solid #BEBEBE; + padding: 7px; + margin: 0px; + -webkit-transition: all 0.30s ease-in-out; + -moz-transition: all 0.30s ease-in-out; + -ms-transition: all 0.30s ease-in-out; + -o-transition: all 0.30s ease-in-out; + outline: none; +} + +.showHideTextarea_displayed +{ + display: block; + width: 100%; + font-size: 15px; + height: 300px; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + border: 1px solid #BEBEBE; + padding: 7px; + margin: 0px; + -webkit-transition: all 0.30s ease-in-out; + -moz-transition: all 0.30s ease-in-out; + -ms-transition: all 0.30s ease-in-out; + -o-transition: all 0.30s ease-in-out; + outline: none; +} +/* +.showHideTextarea_hidden textarea:focus +{ + -moz-box-shadow: 0 0 8px #88D5E9; + -webkit-box-shadow: 0 0 8px #88D5E9; + box-shadow: 0 0 8px #88D5E9; + border: 1px solid #88D5E9; +} + +.showHideTextarea_displayed textarea:focus +{ + -moz-box-shadow: 0 0 8px #88D5E9; + -webkit-box-shadow: 0 0 8px #88D5E9; + box-shadow: 0 0 8px #88D5E9; + border: 1px solid #88D5E9; +} +*/ +/* the button - show mode */ +.showHideTextarea_show{ + display: block; + width: 150px; + font-size: 15px; + background-color: #f6f6f6; + font-family: Helvetica, Arial, sans-serif; + font-weight: 300; + list-style: none; + cursor: pointer; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + border: 1px solid #BEBEBE; + padding: 7px; + margin: 0px; + -webkit-transition: all 0.30s ease-in-out; + -moz-transition: all 0.30s ease-in-out; + -ms-transition: all 0.30s ease-in-out; + -o-transition: all 0.30s ease-in-out; + outline: none; +} + +/* the button - hide mode */ +.showHideTextarea_hide{ + display: block; + width: 150px; + font-size: 15px; + background-color: #f6f6f6; + font-family: Helvetica, Arial, sans-serif; + font-weight: 300; + list-style: none; + cursor: pointer; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + border: 1px solid #BEBEBE; + padding: 7px; + margin: 0px; + -webkit-transition: all 0.30s ease-in-out; + -moz-transition: all 0.30s ease-in-out; + -ms-transition: all 0.30s ease-in-out; + -o-transition: all 0.30s ease-in-out; + outline: none; +} + +/* the button - disabled */ +.showHideTextarea_show_disabled{ + display: none; +} + +.showHideTextarea_hide_disabled{ + display: none; +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/styles.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/styles.css new file mode 100644 index 0000000..a1a8e47 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/css/styles.css @@ -0,0 +1,556 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +.layoutWrapper { + margin: 0 40px; +} + +.appHeading { + color:rgb(51, 51, 51); + display:block; + font-family:Arial, Helvetica, sans-serif; + font-size:12px; + height:32px; + line-height:12px; + position:relative; +} + +.headerAreaPlaceholder { + position: relative; + height: 28px; + background-color: #E8E8E8; + padding-top: 0.4rem; + margin: 12px 0px 0px; + border-radius: 3px; + margin-bottom: -42px; + z-index: -1; +} + +.headerArea { + top: 50px; + padding: 5px 0px 5px; + margin: 9px 0px 0px; + background-color: #E8E8E8; + border-radius: 3px; +} + +.menuArea { + float: left; +} + +.mainTabs { + position: absolute; + top: 20px; + bottom: 20px; + width: auto; + border: solid 1px #CCCCCC; +} + +.mainArea { + padding-bottom: 100px; /*height of footer*/ +} + +.footerArea { + position: fixed; + bottom: 0; + left: 0; + width: 100%; + height: 60px; + border: 3px solid #73AD21; + background-color: powderblue; +} + +.footerArea table { + width: auto; + border-spacing: 2; +} + +.footerArea td.static { + width: 150px; + vertical-align: top; + padding: 3px 3px 3px 3px; +} + +.footerArea td.scroll { + width: 90%; + vertical-align: top; +} + +.footerArea table.scroll { + width: 100%; + border-spacing: 2; +} + +.footerArea table.scroll tbody, .footerArea table.scroll tr { + display: block; +} + +.footerArea table.scroll tbody { + height: 90px; + overflow-y: auto; + overflow-x: hidden; +} + +.footerArea table.scroll tbody td { + width: auto; +} + +.footerArea table.scroll td { + border: solid 1px #CCCCCC; +} + +.footerArea table.scroll thead th:last-child { + width: auto; +} + +.footerArea thead tr { + height: 60px; + line-height: 30px; + text-align: left; +} + +.footerArea tbody td:last-child { + border-right: none !important; +} + +.edit_area_toggle_checkbox { + display: inline-block !important; + font-weight: normal !important; + font-size: 16px !important; +} + +.newModelFormDiv { + background-color: white; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 600px; + height: 420px; + resize: both; + overflow: auto; + padding: 10px 10px 10px 10px; + border: 1px solid #c0c0c0; + border-radius: 3px; + box-shadow: 0 3px 6px #999999; +} + +.newModelFormDiv .headingSpan { + width: 100%; + height: 30px; + display: inline-block; + text-align: center; + font-weight: bold; + font-size: 20px; + padding: 5px 0px 0px 0px; + border-bottom: #c0c0c0 solid 1px; +} + +.newModelDivBackground { + position: fixed; + height: 100%; + width: 100%; + background-color: rgba(0,0,0,0.5); + top: 0px; + left: 0px; +} + +.resultFormDiv { + background-color: white; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 600px; + height: 620px; + resize: both; + overflow: auto; + padding: 10px 10px 10px 10px; + border: 1px solid #c0c0c0; + border-radius: 3px; + box-shadow: 0 3px 6px #999999; +} + +.resultFormDiv .headingSpan { + width: 100%; + height: 30px; + display: inline-block; + text-align: center; + font-weight: bold; + font-size: 20px; + padding: 5px 0px 0px 0px; + border-bottom: #c0c0c0 solid 1px; +} + +.resultFormDiv .okButton { + font-size: 15px; + float: right; +} + +.resultFormDiv .form-style-1 .field-textarea { + height: 500px; + font-size: 15px; +} + + +.form-style-1 { + margin: 10px auto; + font: 16px "Lucida Sans Unicode", "Lucida Grande", sans-serif; +} + +.form-style-1 li { + padding: 0; + display: block; + list-style: none; + margin: 10px 0 0 0; +} + +.form-style-1 label { + margin: 0 0 3px 0; + padding: 0px; + display: block; + font-weight: bold; +} + +.form-style-1 input[type=text], .form-style-1 input[type=date], + .form-style-1 input[type=datetime], .form-style-1 input[type=number], + .form-style-1 input[type=search], .form-style-1 input[type=time], + .form-style-1 input[type=url], .form-style-1 input[type=email], + textarea, select { + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + border: 1px solid #BEBEBE; + padding: 0px 7px; + margin: 0px; + -webkit-transition: all 0.30s ease-in-out; + -moz-transition: all 0.30s ease-in-out; + -ms-transition: all 0.30s ease-in-out; + -o-transition: all 0.30s ease-in-out; + outline: none; +} + +.form-style-1 input[type=text]:focus, .form-style-1 input[type=date]:focus, + .form-style-1 input[type=datetime]:focus, .form-style-1 input[type=number]:focus, + .form-style-1 input[type=search]:focus, .form-style-1 input[type=time]:focus, + .form-style-1 input[type=url]:focus, .form-style-1 input[type=email]:focus, + .form-style-1 textarea:focus, .form-style-1 select:focus { + -moz-box-shadow: 0 0 8px #88D5E9; + -webkit-box-shadow: 0 0 8px #88D5E9; + box-shadow: 0 0 8px #88D5E9; + border: 1px solid #88D5E9; +} +.form-style-1 input:focus::-webkit-input-placeholder { color:transparent; } +.form-style-1 input:focus:-moz-placeholder { color:transparent; } + +.form-style-1 .field { + font-size: 15px; +} + +.form-style-1 .field-divided { + width: 49%; + font-size: 15px; +} + +.form-style-1 .field-long { + width: 100%; + font-size: 15px; +} + +.form-style-1 .field-medium { + width: 50%; + font-size: 15px; +} + +.form-style-1 .field-select { + width: 100%; + font-size: 15px; +} + +.form-style-1 .field-textarea { + height: 100px; + font-size: 15px; +} + +.form-style-1 .field-javaType{ + width: 100%; + font-size: 15px; +} + +.form-style-1 .field-schemaFlavour{ + width: 100%; + font-size: 15px; +} + +.form-style-1 .field-taskSelLogic{ + width: 100%; + font-size: 15px; + height: 300px; +} + +.form-style-1 .field-taskLogic{ + width: 100%; + font-size: 15px; + height: 300px; +} + +.form-style-1 .field-finalizerLogic{ + width: 100%; + font-size: 15px; + height: 300px; +} + +.form-style-1 .field-schemaDefinition{ + width: 100%; + font-size: 15px; + height: 100px; +} + +.form-style-1 .required { + color: red; +} + +.form-style-1 .button { + font-size: 15px; +} + +.form-style-1 .delete_ex { + height: 30px; + width: 30px; + opacity: 1; + font-size: 30px; + line-height: 30px; + transition: all 0.8s; + border: 1px solid transparent; + text-align: center; +} +.form-style-1 .delete_ex:hover { + border-radius: 50%; + background: tomato; + border: 1px solid black; +} +.form-style-1 .delete_ex_disabled { + width: 0px; + opacity: 0; +} + + + +.hideable_div_hidden +{ + display: none; +} + +.hideable_div_displayed +{ + display: block; +} + + + +/* the textarea */ +.hideable_Textarea_hidden +{ + display: none; +} + +.hideable_Textarea_displayed +{ + display: block; + width: 100%; + height: 300px; +} + +.hideable_Textarea_hidden textarea:focus +{ + -moz-box-shadow: 0 0 8px #88D5E9; + -webkit-box-shadow: 0 0 8px #88D5E9; + box-shadow: 0 0 8px #88D5E9; + border: 1px solid #88D5E9; +} + +.hideable_Textarea_displayed textarea:focus +{ + -moz-box-shadow: 0 0 8px #88D5E9; + -webkit-box-shadow: 0 0 8px #88D5E9; + box-shadow: 0 0 8px #88D5E9; + border: 1px solid #88D5E9; +} + +/* the button - show mode */ +.showhide_button_show{ + display: block; + width: 150px; + font-size: 15px; + background-color: #f6f6f6; + font-family: Helvetica, Arial, sans-serif; + font-weight: 300; + list-style: none; + cursor: pointer; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + border: 1px solid #BEBEBE; + padding: 7px; + margin: 0px; + -webkit-transition: all 0.30s ease-in-out; + -moz-transition: all 0.30s ease-in-out; + -ms-transition: all 0.30s ease-in-out; + -o-transition: all 0.30s ease-in-out; + outline: none; +} + +/* the button - hide mode */ +.showhide_button_hide{ + display: block; + width: 150px; + font-size: 15px; + background-color: #f6f6f6; + font-family: Helvetica, Arial, sans-serif; + font-weight: 300; + list-style: none; + cursor: pointer; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + border: 1px solid #BEBEBE; + padding: 7px; + margin: 0px; + -webkit-transition: all 0.30s ease-in-out; + -moz-transition: all 0.30s ease-in-out; + -ms-transition: all 0.30s ease-in-out; + -o-transition: all 0.30s ease-in-out; + outline: none; +} + +.showhide_div_hide{ + display: none; +} + +.showhide_div_show{ + display: block; +} + +.add-field { + display: inline-block; + cursor: pointer; + margin-left: 1px; +} + +.form-add-icon, .form-add-text { + display: inline-block; + vertical-align: middle; +} + +.form-add-text { + margin-left: 8px; +} + +.form-heading { + text-align: start; +} + +.ui-tabs-tab-custom { + border-radius: 5px 5px 0px 0px; +} + +.ui-tabs-active-custom { + border: 1px solid #ccc !important; + border-width: 1px 0 0 1px !important; + background-image: none !important; + background-color: #fff !important; + border-bottom-color: transparent !important; + cursor: default !important; +} + +.ui-tabs-anchor-custom { + color: #454545 !important; +} + +input:disabled { + background-color: #FF0000; +} + +.modelTagArea { + height: 24px; +} + +.modelTag { + display: none; +} + +.field-add-new { + display: none; +} + +.field-checkbox-center { + text-align: center; + vertical-align: middle; +} + +.placeholder { + text-align: center; + white-space: nowrap; +} + +.onapLogo { + padding-right: 100px; + height: 75px; + width: 350px; +} + +.apexLogo { + height: 267px; + width: 350px; +} + +.ui-tabs-panel { + overflow-x: auto; +} + +.periodic-events-checkbox { + margin-left: 12px; +} + +.periodic-events-label { + display: inline-block !important; + font-weight: normal !important; + font: 14px Lucida Sans Unicode, Lucida Grande, sans-serif !important; +} + +.policy-trigger-event { + display: inline-block !important; + font-weight: normal !important; +} + +input:focus::-webkit-input-placeholder { color:transparent; } +input:focus:-moz-placeholder { color:transparent; } /* Firefox 18- */ +input:focus::-moz-placeholder { color:transparent; } /* Firefox 19+ */ +input:focus:-ms-input-placeholder { color:transparent; } /* IE */ + +textarea:focus::-webkit-input-placeholder { color:transparent; } +textarea:focus:-moz-placeholder { color:transparent; } /* Firefox 18- */ +textarea:focus::-moz-placeholder { color:transparent; } /* Firefox 19+ */ +textarea:focus:-ms-input-placeholder { color:transparent; } /* IE */ + +.title { + padding: 0px; +} \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/images/Apex.png b/gui-editors/gui-editor-apex/src/main/resources/webapp/images/Apex.png new file mode 100644 index 0000000..e71451f Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/images/Apex.png differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/images/logo_onap.png b/gui-editors/gui-editor-apex/src/main/resources/webapp/images/logo_onap.png new file mode 100644 index 0000000..c6f6857 Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/images/logo_onap.png differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/index.html b/gui-editors/gui-editor-apex/src/main/resources/webapp/index.html new file mode 100644 index 0000000..329e060 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/index.html @@ -0,0 +1,240 @@ + + + + + + +Apex Policy Editor + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Apex
+
+ +
+ +
+
+ Apex +
+ +
+ +
+

Apex Policy Editor

+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexAjax.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexAjax.js new file mode 100644 index 0000000..c241a44 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexAjax.js @@ -0,0 +1,123 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function ajax_get(requestURL, callback) { + $.ajax({ + type : 'GET', + url : requestURL, + dataType : "json", // data type of response + success : function(data, textStatus, jqXHR) { + pageControl_successStatus(data); + callback(data); + }, + error : function(jqXHR, textStatus, errorThrown) { + pageControl_restError(requestURL, jqXHR, textStatus, errorThrown); + } + }); +} + +function ajax_getWithKeyInfo(requestURL, objectType, callback, keyName) { + var keyName = keyName || "key"; + var keyInfoURL = restRootURL + "/KeyInformation/Get?name=&version="; + ajax_get(keyInfoURL, function(dataKeyInfos) { + ajax_get(requestURL, function(data) { + var keyInfos = []; + for ( var i = 0; i < dataKeyInfos.messages.message.length; i++) { + var ki = JSON.parse(dataKeyInfos.messages.message[i]).apexKeyInfo; + keyInfos.push(ki); + } + var object = JSON.parse(data.messages.message[0])[objectType]; + var keyInfo = keyInfos.filter(function(ki) { + return ki.key.name === object[keyName].name + && ki.key.version === object[keyName].version; + }); + if (keyInfo.length > 0) { + object.uuid = keyInfo[0].UUID; + object.description = keyInfo[0].description; + } + callback(object); + }); + }); +} + +function ajax_getOKOrFail(requestURL, callback) { + $.ajax({ + type : 'GET', + url : requestURL, + dataType : "json", // data type of response + success : function(data, textStatus, jqXHR) { + pageControl_status(data); + callback(data); + }, + error : function(jqXHR, textStatus, errorThrown) { + pageControl_restError(requestURL, jqXHR, textStatus, errorThrown); + } + }); +} + +function ajax_put(requestURL, requestData, callback) { + $.ajax({ + type : 'PUT', + contentType : 'application/json', + url : requestURL, + dataType : "json", + data : requestData, + success : function(responseData, textStatus, jqXHR) { + pageControl_successStatus(responseData); + callback(responseData); + }, + error : function(jqXHR, textStatus, errorThrown) { + pageControl_restError(requestURL, jqXHR, textStatus, errorThrown); + } + }); +} + +function ajax_post(requestURL, requestData, callback) { + $.ajax({ + type : 'POST', + contentType : 'application/json', + url : requestURL, + dataType : "json", + data : requestData, + success : function(responseData, textStatus, jqXHR) { + pageControl_successStatus(responseData); + callback(responseData); + }, + error : function(jqXHR, textStatus, errorThrown) { + pageControl_restError(requestURL, jqXHR, textStatus, errorThrown); + } + }); +} + +function ajax_delete(requestURL, callback) { + $.ajax({ + type : 'DELETE', + url : requestURL, + dataType : "json", // data type of response + success : function(data, textStatus, jqXHR) { + pageControl_successStatus(data); + callback(data); + }, + error : function(jqXHR, textStatus, errorThrown) { + pageControl_restError(requestURL, jqXHR, textStatus, errorThrown); + } + }); +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumEditForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumEditForm.js new file mode 100644 index 0000000..602fa49 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumEditForm.js @@ -0,0 +1,475 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function editContextAlbumForm_createContextAlbum(formParent) { + // Get all contextSchemas too for album item schema + var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var contextSchemas = new Array(); + ajax_get(requestURL, function(data2) { + for (var i = 0; i < data2.messages.message.length; i++) { + var contextSchema = JSON.parse(data2.messages.message[i]).apexContextSchema; + contextSchemas.push({ + "name" : contextSchema.key.name, + "version" : contextSchema.key.version, + "displaytext" : contextSchema.key.name + ":" + contextSchema.key.version, + "contextSchema" : contextSchema + }); + } + editContextAlbumForm_activate(formParent, "CREATE", null, contextSchemas); + }); +} + +function editContextAlbumForm_deleteContextAlbum(parent, name, version) { + var message = "Are you sure you want to delete ContextAlbum \"" + name + ":" + version + "\"?"; + if (apexUtils_areYouSure(message)) { + var requestURL = restRootURL + "/ContextAlbum/Delete?name=" + name + "&version=" + version; + ajax_delete(requestURL, function(data) { + apexUtils_removeElement("editContextAlbumFormDiv"); + contextAlbumTab_reset(); + keyInformationTab_reset() + }); + } +} + +function editContextAlbumForm_viewContextAlbum(parent, name, version) { + var requestURL = restRootURL + "/ContextAlbum/Get?name=" + name + "&version=" + version; + ajax_getWithKeyInfo(requestURL, "apexContextAlbum", function(contextAlbum) { + // Get all contextSchemas too for album item schema + var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var contextSchemas = new Array(); + ajax_get(requestURL, function(data2) { + for (var i = 0; i < data2.messages.message.length; i++) { + var contextSchema = JSON.parse(data2.messages.message[i]).apexContextSchema; + contextSchemas.push({ + "name" : contextSchema.key.name, + "version" : contextSchema.key.version, + "displaytext" : contextSchema.key.name + ":" + contextSchema.key.version, + "contextSchema" : contextSchema + }); + } + editContextAlbumForm_activate(parent, "VIEW", contextAlbum, contextSchemas); + }); + }); +} + +function editContextAlbumForm_editContextAlbum(formParent, name, version) { + var requestURL = restRootURL + "/ContextAlbum/Get?name=" + name + "&version=" + version; + ajax_getWithKeyInfo(requestURL, "apexContextAlbum", function(contextAlbum) { + // Get all contextSchemas too for album item schema + var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var contextSchemas = new Array(); + ajax_get(requestURL, function(data2) { + for (var i = 0; i < data2.messages.message.length; i++) { + var contextSchema = JSON.parse(data2.messages.message[i]).apexContextSchema; + contextSchemas.push({ + "name" : contextSchema.key.name, + "version" : contextSchema.key.version, + "displaytext" : contextSchema.key.name + ":" + contextSchema.key.version, + "contextSchema" : contextSchema + }); + } + editContextAlbumForm_activate(formParent, "EDIT", contextAlbum, contextSchemas); + }); + }); +} + +function editContextAlbumForm_activate(parent, operation, contextAlbum, contextSchemas) { + apexUtils_removeElement("editContextAlbumFormDiv"); + var formParent = document.getElementById(parent); + apexUtils_emptyElement(parent); + + var isedit = false; + var createEditOrView = ""; + + if (!operation) { + console.warn("No operation specified for ContextAlbumForm form") + } else { + createEditOrView = operation.toUpperCase(); + } + + if (createEditOrView == "CREATE") { + isedit = true; + } else if (createEditOrView == "EDIT" || createEditOrView == "VIEW") { + if (createEditOrView == "EDIT") { + isedit = true; + } + + if (!contextAlbum) { + console.warn("Invalid value (\"" + contextAlbum + + "\") passed as a value for \"contextAlbum\" for ContextAlbumForm form."); + } else { + if (!contextAlbum.key || !contextAlbum.key.name || contextAlbum.key.name == "") { + console.warn("Invalid value (\"" + contextAlbum.key.name + + "\") passed as a value for \"name\" for ContextAlbumForm form."); + } + if (!contextAlbum.key || !contextAlbum.key.version || contextAlbum.key.version == "") { + console.warn("Invalid value (\"" + contextAlbum.key.version + + "\") passed as a value for \"version\" for ContextAlbumForm form."); + } + if (!contextAlbum.uuid || contextAlbum.uuid == "") { + console.warn("Invalid value (\"" + contextAlbum.uuid + + "\") passed as a value for \"uuid\" for ContextAlbumForm form."); + } + if (createEditOrView == "VIEW") { + if (!contextAlbum.description) { + console.warn("Invalid value (\"" + contextAlbum.description + + "\") passed as a value for \"description\" for ContextAlbumForm form."); + } + if (!contextAlbum.scope || contextAlbum.scope == "") { + console.warn("Invalid value (\"" + contextAlbum.scope + + "\") passed as a value for \"scope\" for ContextAlbumForm form."); + } + if (!contextAlbum.itemSchema || !contextAlbum.itemSchema.name || contextAlbum.itemSchema.name == "" + || !contextAlbum.itemSchema.version || contextAlbum.itemSchema.version == "") { + console.warn("Invalid value (\"" + contextAlbum.itemSchema + + "\") passed as a value for \"itemSchema\" for ContextAlbumForm form."); + } + if (!contextAlbum.isWritable || contextAlbum.isWritable == "") { + console.warn("Invalid value (\"" + contextAlbum.isWritable + + "\") passed as a value for \"isWritable\" for ContextAlbumForm form."); + } + } + } + } else { + console + .warn("Invalid operation (\"" + + operation + + "\") specified for ContextAlbumForm form. Only \"Create\", \"Edit\" and \"View\" operations are supported"); + } + + var contentelement = document.createElement("editContextAlbumFormDiv"); + var formDiv = document.createElement("div"); + contentelement.appendChild(formDiv); + formDiv.setAttribute("id", "editContextAlbumFormDiv"); + formDiv.setAttribute("class", "editContextAlbumFormDiv"); + + var headingSpan = document.createElement("h2"); + formDiv.appendChild(headingSpan); + headingSpan.innerHTML = "Context Item Album Editor"; + + var form = document.createElement("editContextAlbumForm"); + formDiv.appendChild(form); + + form.setAttribute("id", "editContextAlbumForm"); + form.setAttribute("class", "form-style-1"); + form.setAttribute("method", "post"); + form.setAttribute("createEditOrView", createEditOrView); + + var formul = document.createElement("ul"); + form.appendChild(formul); + + var nameLI = document.createElement("li"); + formul.appendChild(nameLI); + var nameLabel = document.createElement("label"); + nameLI.appendChild(nameLabel); + nameLabel.setAttribute("for", "editContextAlbumFormNameInput"); + nameLabel.innerHTML = "Name: "; + var nameLabelSpan = document.createElement("span"); + nameLabel.appendChild(nameLabelSpan); + nameLabelSpan.setAttribute("class", "required"); + nameLabelSpan.innerHTML = "*"; + var nameInput = document.createElement("input"); + nameLI.appendChild(nameInput); + nameInput.setAttribute("id", "editContextAlbumFormNameInput"); + nameInput.setAttribute("type", "text"); + nameInput.setAttribute("name", "editContextAlbumFormameInput"); + nameInput.setAttribute("class", "field ebInput"); + nameInput.setAttribute("placeholder", "name"); + if (contextAlbum && contextAlbum.key && contextAlbum.key.name) { + nameInput.value = contextAlbum.key.name; + } + if (createEditOrView != "CREATE") { + nameInput.readOnly = true; + } + + var versionLI = document.createElement("li"); + formul.appendChild(versionLI); + var versionLabel = document.createElement("label"); + versionLI.appendChild(versionLabel); + versionLabel.setAttribute("for", "editContextAlbumFormVersionInput"); + versionLabel.innerHTML = "Version: "; + var versionInput = document.createElement("input"); + versionLI.appendChild(versionInput); + versionInput.setAttribute("id", "editContextAlbumFormVersionInput"); + versionInput.setAttribute("type", "text"); + versionInput.setAttribute("name", "editContextAlbumFormVersionInput"); + versionInput.setAttribute("class", "field ebInput"); + versionInput.setAttribute("placeholder", "0.0.1"); + if (contextAlbum && contextAlbum.key && contextAlbum.key.version) { + versionInput.value = contextAlbum.key.version; + } + if (createEditOrView != "CREATE") { + versionInput.readOnly = true; + } + + var uuidLI = document.createElement("li"); + formul.appendChild(uuidLI); + var uuidLabel = document.createElement("label"); + uuidLI.appendChild(uuidLabel); + uuidLabel.setAttribute("for", "editContextAlbumFormUuidInput"); + uuidLabel.innerHTML = "UUID: "; + var uuidInput = document.createElement("input"); + uuidLI.appendChild(uuidInput); + uuidInput.setAttribute("id", "editContextAlbumFormUuidInput"); + uuidInput.setAttribute("type", "text"); + uuidInput.setAttribute("name", "editContextAlbumFormUuidInput"); + uuidInput.setAttribute("class", "field-long ebInput ebInput_width_full"); + uuidInput.setAttribute("placeholder", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"); + if (contextAlbum && contextAlbum.uuid) { + uuidInput.value = contextAlbum.uuid; + } + if (createEditOrView != "CREATE") { + uuidInput.readOnly = true; + } + + var disabled = (createEditOrView != "CREATE" && createEditOrView != "EDIT"); + + var descriptionLI = document.createElement("li"); + formul.appendChild(descriptionLI); + var descriptionLabel = document.createElement("label"); + descriptionLI.appendChild(descriptionLabel); + descriptionLabel.setAttribute("for", "editContextAlbumFormDescriptionTextArea"); + descriptionLabel.innerHTML = "Description: "; + var descriptionTextArea = document.createElement("textarea"); + descriptionLI.appendChild(descriptionTextArea); + descriptionTextArea.setAttribute("id", "editContextAlbumFormDescriptionTextArea"); + descriptionTextArea.setAttribute("name", "editContextAlbumFormDescriptionTextArea"); + descriptionTextArea.setAttribute("class", "field-long field-textarea ebTextArea ebTextArea_width_full"); + if (contextAlbum && contextAlbum.description) { + descriptionTextArea.value = contextAlbum.description; + } + descriptionTextArea.readOnly = disabled; + + var albumScopeLI = document.createElement("li"); + formul.appendChild(albumScopeLI); + var albumScopeLabel = document.createElement("label"); + albumScopeLI.appendChild(albumScopeLabel); + albumScopeLabel.setAttribute("for", "editContextAlbumFormAlbumScopeInput"); + albumScopeLabel.innerHTML = "Context Album Scope: "; + var albumScopeInput = document.createElement("input"); + albumScopeLI.appendChild(albumScopeInput); + albumScopeInput.setAttribute("id", "editContextAlbumFormAlbumScopeInput"); + albumScopeInput.setAttribute("type", "text"); + albumScopeInput.setAttribute("name", "editContextAlbumFormAlbumScopeInput"); + albumScopeInput.setAttribute("class", "field-albumScope ebInput"); + albumScopeInput.setAttribute("placeholder", "Global"); + if (contextAlbum && contextAlbum.scope) { + albumScopeInput.value = contextAlbum.scope; + } + albumScopeInput.readOnly = disabled; + + var albumReadOnlyLI = document.createElement("li"); + formul.appendChild(albumReadOnlyLI); + var albumReadOnlyLabel = document.createElement("label"); + albumReadOnlyLI.appendChild(albumReadOnlyLabel); + albumReadOnlyLabel.setAttribute("for", "editContextAlbumFormAlbumReadOnlyInput"); + albumReadOnlyLabel.innerHTML = "Read Only? "; + var albumReadOnlyInput = document.createElement("input"); + albumReadOnlyInput.setAttribute("type", "checkbox"); + albumReadOnlyLI.appendChild(albumReadOnlyInput); + albumReadOnlyInput.setAttribute("id", "editContextAlbumFormAlbumReadOnlyCheckbox"); + albumReadOnlyInput.setAttribute("name", "editContextAlbumFormAlbumReadOnlyCheckbox"); + albumReadOnlyInput.setAttribute("class", "field-albumReadonlyCheckbox"); + if (contextAlbum && contextAlbum.isWritable != null && contextAlbum.isWritable === false) { + albumReadOnlyInput.checked = true; + } else { + albumReadOnlyInput.checked = false; + } + albumReadOnlyInput.disabled = disabled; + + var albumItemSchemaLI = document.createElement("li"); + formul.appendChild(albumItemSchemaLI); + var albumItemSchemaLabel = document.createElement("label"); + albumItemSchemaLI.appendChild(albumItemSchemaLabel); + albumItemSchemaLabel.setAttribute("for", "editContextAlbumFormAlbumItemSchema"); + albumItemSchemaLabel.innerHTML = "Schema/Type of Album items: "; + var selected = null; + if (contextAlbum && contextAlbum.itemSchema != null && contextAlbum.itemSchema.name != null + && contextAlbum.itemSchema.version != null && contextAlbum.itemSchema.name != "" + && contextAlbum.itemSchema.version != "") { + selected = { + "name" : contextAlbum.itemSchema.name, + "version" : contextAlbum.itemSchema.version, + "displaytext" : contextAlbum.itemSchema.name + ":" + contextAlbum.itemSchema.version, + "contextAlbum" : contextAlbum + }; + } + var selectDiv = dropdownList("editContextAlbumFormAlbumItemSchema", contextSchemas, selected, disabled, null); + if (selectDiv == null) { + console.error("Cannot create a Context Album because there are no contextSchemas to add to it"); + alert("Cannot create a Context Album because there are no contextSchemas to add to it"); + editContextAlbumForm_cancelPressed(); + } else { + albumItemSchemaLI.appendChild(selectDiv); + } + + var inputLI = document.createElement("li"); + formul.appendChild(inputLI); + if (createEditOrView == "CREATE") { + var generateUUIDInput = document.createElement("button"); + inputLI.appendChild(generateUUIDInput); + generateUUIDInput.setAttribute("id", "generateUUID"); + generateUUIDInput.setAttribute("class", "ebBtn ebBtn_large"); + generateUUIDInput.setAttribute("type", "submit"); + generateUUIDInput.setAttribute("value", "Generate UUID"); + generateUUIDInput.onclick = editContextAlbumForm_generateUUIDPressed; + generateUUIDInput.innerHTML = generateUUIDInput.getAttribute("value"); + var inputSpan0 = document.createElement("span"); + inputLI.appendChild(inputSpan0); + inputSpan0.setAttribute("class", "required"); + inputSpan0.innerHTML = " "; + } + if (createEditOrView == "CREATE") { + var generateDescriptionInput = document.createElement("button"); + inputLI.appendChild(generateDescriptionInput); + generateDescriptionInput.setAttribute("id", "generateDescription"); + generateDescriptionInput.setAttribute("class", "ebBtn ebBtn_large"); + generateDescriptionInput.setAttribute("type", "submit"); + generateDescriptionInput.setAttribute("value", "Generate Description"); + generateDescriptionInput.onclick = editContextAlbumForm_generateDescriptionPressed; + generateDescriptionInput.innerHTML = generateDescriptionInput.getAttribute("value"); + var inputSpan1 = document.createElement("span"); + inputLI.appendChild(inputSpan1); + inputSpan1.setAttribute("class", "required"); + inputSpan1.innerHTML = " "; + } + + var cancelInput = document.createElement("button"); + inputLI.appendChild(cancelInput); + cancelInput.setAttribute("id", "cancel"); + cancelInput.setAttribute("class", "ebBtn ebBtn_large"); + cancelInput.setAttribute("type", "submit"); + cancelInput.setAttribute("value", "Cancel"); + cancelInput.onclick = editContextAlbumForm_cancelPressed; + cancelInput.innerHTML = cancelInput.getAttribute("value"); + + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var inputSpan2 = document.createElement("span"); + inputLI.appendChild(inputSpan2); + inputSpan2.setAttribute("class", "required"); + inputSpan2.innerHTML = " "; + + var submitInput = document.createElement("button"); + inputLI.appendChild(submitInput); + submitInput.setAttribute("id", "submit"); + submitInput.setAttribute("class", "ebBtn ebBtn_large"); + submitInput.setAttribute("type", "submit"); + submitInput.setAttribute("value", "Submit"); + submitInput.onclick = editContextAlbumForm_submitPressed; + submitInput.innerHTML = submitInput.getAttribute("value"); + } + + formParent.appendChild(contentelement); + scrollToTop(); +} + +function editContextAlbumForm_generateUUIDPressed() { + document.getElementById("editContextAlbumFormUuidInput").value = formUtils_generateUUID(); +} + +function editContextAlbumForm_generateDescriptionPressed() { + document.getElementById("editContextAlbumFormDescriptionTextArea").value = formUtils_generateDescription(document + .getElementById("editContextAlbumFormNameInput").value, document + .getElementById("editContextAlbumFormVersionInput").value, document + .getElementById("editContextAlbumFormUuidInput").value); +} + +function editContextAlbumForm_cancelPressed() { + apexUtils_removeElement("editContextAlbumFormDiv"); + contextAlbumTab_reset(); +} + +function editContextAlbumForm_submitPressed() { + var createEditOrView = $('#editContextAlbumForm').attr("createEditOrView"); + if (!createEditOrView || createEditOrView == "" || (createEditOrView != "CREATE" && createEditOrView != "EDIT")) { + console.error("Invalid operation \"" + createEditOrView + + "\" passed to editContextAlbumForm_submitPressed function. Edit failed"); + apexUtils_removeElement("editContextAlbumFormDiv"); + contextAlbumTab_reset(); + return; + } + + var name = $('#editContextAlbumFormNameInput').val(); + var version = $('#editContextAlbumFormVersionInput').val(); + + var selectedschema = document.getElementById("editContextAlbumFormAlbumItemSchema_dropdownList").selectedOption; + if (selectedschema == null) { + alert("Context Album \"" + name + "\" has no selected Album Item Schema/Type"); + return false; + } + var itemschema = { + "name" : selectedschema.name, + "version" : selectedschema.version + }; + + var scope = $('#editContextAlbumFormAlbumScopeInput').val().toUpperCase(); + if (scope != "APPLICATION" && scope != "EXTERNAL" && scope != "GLOBAL") { + var message = "Are you sure you want to set the scope ContextAlbum to \"" + scope + + "\"? Currently the only scope supported are: \"APPLICATION\", \"EXTERNAL\" and \"GLOBAL\""; + if (!apexUtils_areYouSure(message)) { + return false; + } + } + var readonly = $('#editContextAlbumFormAlbumReadOnlyCheckbox').prop('checked'); + if (readonly && scope != "EXTERNAL") { + var message = "Are you sure you want to set the scope ContextAlbum to \"" + + scope + + "\" while it is set as Read Only. It only makes sense to use readonly for \"EXTERNAL\" Context Albums. If this Album is readonly it cannot be set!"; + if (!apexUtils_areYouSure(message)) { + return false; + } + } + if (!readonly && scope == "EXTERNAL") { + var message = "Are you sure you want to set the scope ContextAlbum to \"" + + scope + + "\" while it is not set as Read Only. It only makes sense to use readonly for \"EXTERNAL\" Context Albums since EXTERNAL context cannot be set in policies."; + if (!apexUtils_areYouSure(message)) { + return false; + } + } + + var jsonString = JSON.stringify({ + "name" : name, + "version" : version, + "uuid" : $('#editContextAlbumFormUuidInput').val(), + "description" : $('#editContextAlbumFormDescriptionTextArea').val(), + "itemSchema" : itemschema, + "scope" : scope, + "writeable" : !readonly + }); + + if (createEditOrView == "CREATE") { + var requestURL = restRootURL + "/ContextAlbum/Create"; + ajax_post(requestURL, jsonString, function(resultData) { + apexUtils_removeElement("editContextAlbumFormDiv"); + contextAlbumTab_reset(); + keyInformationTab_reset() + }); + } else if (createEditOrView == "EDIT") { + var requestURL = restRootURL + "/ContextAlbum/Update"; + ajax_put(requestURL, jsonString, function(resultData) { + apexUtils_removeElement("editContextAlbumFormDiv"); + contextAlbumTab_reset(); + keyInformationTab_reset() + }); + } + +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumTab.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumTab.js new file mode 100644 index 0000000..f1aca66 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumTab.js @@ -0,0 +1,116 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function contextAlbumTab_reset() { + contextAlbumTab_deactivate(); + contextAlbumTab_activate(); +} + +function contextAlbumTab_activate() { + contextAlbumTab_create(); + + var requestURL = restRootURL + "/ContextAlbum/Get?name=&version="; + + ajax_get(requestURL, function(data) { + $("#contextAlbumTableBody").find("tr:gt(0)").remove(); + + for (var i = 0; i < data.messages.message.length; i++) { + var contextAlbum = JSON.parse(data.messages.message[i]).apexContextAlbum; + + var contextAlbumRow_tr = document.createElement("tr"); + var contextAlbumid = contextAlbum.key.name + ":" + contextAlbum.key.version; + + + var contextAlbumTableRow = + "" + + contextAlbum.key.name + ":" + contextAlbum.key.version + + "" + + "" + + contextAlbum.scope + + "" + + "" + + contextAlbum.isWritable + + "" + + "" + + contextAlbum.itemSchema.name + ":" + contextAlbum.itemSchema.version + + "" ; + + contextAlbumRow_tr.innerHTML = contextAlbumTableRow; + contextAlbumRow_tr.addEventListener('contextmenu', rightClickMenu_scopePreserver("contextAlbumTabContent", "contextAlbum", contextAlbum.key.name, contextAlbum.key.version)); + + $("#contextAlbumTableBody").append(contextAlbumRow_tr); + + } + }); +} + +function contextAlbumTab_deactivate() { + apexUtils_removeElement("contextAlbumTabContent"); +} + +function contextAlbumTab_create() { + var contextAlbumTab = document.getElementById("contextAlbumsTab"); + + var contextAlbumTabContent = document.getElementById("contextAlbumTabContent"); + if (contextAlbumTabContent != null) { + return + } + + var contextAlbumTabContent = document.createElement("contextAlbumTabContent"); + contextAlbumTab.appendChild(contextAlbumTabContent); + contextAlbumTabContent.setAttribute("id", "contextAlbumTabContent"); + contextAlbumTabContent.addEventListener('contextmenu', rightClickMenu_scopePreserver("contextAlbumTabContent", "contextAlbum",null, null)); + + var contextAlbumTable = createTable("contextAlbumTable"); + contextAlbumTabContent.appendChild(contextAlbumTable); + + var contextAlbumTableHeader = document.createElement("thead"); + contextAlbumTable.appendChild(contextAlbumTableHeader); + contextAlbumTableHeader.setAttribute("id", "contextAlbumTableHeader"); + + var contextAlbumTableHeaderRow = document.createElement("tr"); + contextAlbumTableHeader.appendChild(contextAlbumTableHeaderRow); + contextAlbumTableHeaderRow.setAttribute("id", "contextAlbumTableHeaderRow"); + + var contextAlbumTableKeyHeader = document.createElement("th"); + contextAlbumTableHeaderRow.appendChild(contextAlbumTableKeyHeader); + contextAlbumTableKeyHeader.setAttribute("id", "contextAlbumTableKeyHeader"); + contextAlbumTableKeyHeader.appendChild(document.createTextNode("Context Album")); + + var contextAlbumTableScopeHeader = document.createElement("th"); + contextAlbumTableHeaderRow.appendChild(contextAlbumTableScopeHeader); + contextAlbumTableScopeHeader.setAttribute("id", "contextAlbumTableScopeHeader"); + contextAlbumTableScopeHeader.appendChild(document.createTextNode("Scope")); + + var contextAlbumTableWriteableHeader = document.createElement("th"); + contextAlbumTableHeaderRow.appendChild(contextAlbumTableWriteableHeader); + contextAlbumTableWriteableHeader.setAttribute("id", "contextAlbumTableWritableHeader"); + contextAlbumTableWriteableHeader.appendChild(document.createTextNode("Writable")); + + var contextAlbumTableItemSchemaHeader = document.createElement("th"); + contextAlbumTableHeaderRow.appendChild(contextAlbumTableItemSchemaHeader); + contextAlbumTableItemSchemaHeader.setAttribute("id", "contextAlbumTableItemSchemaHeader"); + contextAlbumTableItemSchemaHeader.appendChild(document.createTextNode("Item Schema")); + + var contextAlbumTableBody = document.createElement("tbody"); + contextAlbumTable.appendChild(contextAlbumTableBody); + contextAlbumTable.setAttribute("id", "contextAlbumTableBody"); +} \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaEditForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaEditForm.js new file mode 100644 index 0000000..52dcff8 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaEditForm.js @@ -0,0 +1,369 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function editContextSchemaForm_createContextSchema(formParent) { + return editContextSchemaForm_activate(formParent, "CREATE", null); +} + +function editContextSchemaForm_deleteContextSchema(parent, name, version) { + var message = "Are you sure you want to delete ContextSchema \"" + name + ":" + version + "\"?"; + if (apexUtils_areYouSure(message)) { + var requestURL = restRootURL + "/ContextSchema/Delete?name=" + name + "&version=" + version; + ajax_delete(requestURL, function(data) { + apexUtils_removeElement("editContextSchemaFormDiv"); + contextSchemaTab_reset(); + keyInformationTab_reset() + }); + } +} + +function editContextSchemaForm_viewContextSchema(parent, name, version) { + var requestURL = restRootURL + "/ContextSchema/Get?name=" + name + "&version=" + version; + ajax_getWithKeyInfo(requestURL, "apexContextSchema", function(contextSchema) { + editContextSchemaForm_activate(parent, "VIEW", contextSchema); + }); +} + +function editContextSchemaForm_editContextSchema(formParent, name, version) { + var requestURL = restRootURL + "/ContextSchema/Get?name=" + name + "&version=" + version; + ajax_getWithKeyInfo(requestURL, "apexContextSchema", function(contextSchema) { + editContextSchemaForm_activate(formParent, "EDIT", contextSchema); + }); +} + +function editContextSchemaForm_activate(parent, operation, contextSchema) { + apexUtils_removeElement("editContextSchemaFormDiv"); + var formParent = document.getElementById(parent); + apexUtils_emptyElement(parent); + + var isedit = false; + var createEditOrView = ""; + + if (!operation) { + console.warn("No operation specified for ContextSchemaForm form") + } else { + createEditOrView = operation.toUpperCase(); + } + + if (createEditOrView == "CREATE") { + isedit = true; + } else if (createEditOrView == "EDIT" || createEditOrView == "VIEW") { + if (createEditOrView == "EDIT") { + isedit = true; + } + + if (!contextSchema) { + console.warn("Invalid value (\"" + contextSchema + + "\") passed as a value for \"contextSchema\" for ContextSchemaForm form."); + } else { + if (!contextSchema.key || !contextSchema.key.name || contextSchema.key.name == "") { + console.warn("Invalid value (\"" + contextSchema.key.name + + "\") passed as a value for \"name\" for ContextSchemaForm form."); + } + if (!contextSchema.key || !contextSchema.key.version || contextSchema.key.version == "") { + console.warn("Invalid value (\"" + contextSchema.key.version + + "\") passed as a value for \"version\" for ContextSchemaForm form."); + } + if (!contextSchema.uuid || contextSchema.uuid == "") { + console.warn("Invalid value (\"" + contextSchema.uuid + + "\") passed as a value for \"uuid\" for ContextSchemaForm form."); + } + if (createEditOrView == "VIEW") { + if (!contextSchema.description) { + console.warn("Invalid value (\"" + contextSchema.description + + "\") passed as a value for \"description\" for ContextSchemaForm form."); + } + if (!contextSchema.schemaFlavour || contextSchema.schemaFlavour == "") { + console.warn("Invalid value (\"" + contextSchema.schemaFlavour + + "\") passed as a value for \"schemaFlavour\" for ContextSchemaForm form."); + } + if (!contextSchema.schemaDefinition || contextSchema.schemaDefinition == "") { + console.warn("Invalid value (\"" + contextSchema.schemaDefinition + + "\") passed as a value for \"schemaDefinition\" for ContextSchemaForm form."); + } + } + } + } else { + console + .warn("Invalid operation (\"" + + operation + + "\") specified for ContextSchemaForm form. Only \"Create\", \"Edit\" and \"View\" operations are supported"); + } + + var contentelement = document.createElement("editContextSchemaFormDiv"); + var formDiv = document.createElement("div"); + contentelement.appendChild(formDiv); + formDiv.setAttribute("id", "editContextSchemaFormDiv"); + formDiv.setAttribute("class", "editContextSchemaFormDiv"); + + var headingSpan = document.createElement("h2"); + headingSpan.innerHTML = "Context Item Schema Editor"; + formDiv.appendChild(headingSpan); + + var form = document.createElement("editContextSchemaForm"); + formDiv.appendChild(form); + + form.setAttribute("id", "editContextSchemaForm"); + form.setAttribute("class", "form-style-1"); + form.setAttribute("method", "post"); + form.setAttribute("createEditOrView", createEditOrView); + + var formul = document.createElement("ul"); + form.appendChild(formul); + + var nameLI = document.createElement("li"); + formul.appendChild(nameLI); + var nameLabel = document.createElement("label"); + nameLI.appendChild(nameLabel); + nameLabel.setAttribute("for", "editContextSchemaFormNameInput"); + nameLabel.innerHTML = "Name: "; + var nameLabelSpan = document.createElement("span"); + nameLabel.appendChild(nameLabelSpan); + nameLabelSpan.setAttribute("class", "required"); + nameLabelSpan.innerHTML = "*"; + var nameInput = document.createElement("input"); + nameLI.appendChild(nameInput); + nameInput.setAttribute("id", "editContextSchemaFormNameInput"); + nameInput.setAttribute("type", "text"); + nameInput.setAttribute("name", "editContextSchemaFormameInput"); + nameInput.setAttribute("class", "field ebInput"); + nameInput.setAttribute("placeholder", "name"); + if (contextSchema && contextSchema.key && contextSchema.key.name) { + nameInput.value = contextSchema.key.name; + } + if (createEditOrView != "CREATE") { + nameInput.readOnly = true; + } + + var versionLI = document.createElement("li"); + formul.appendChild(versionLI); + var versionLabel = document.createElement("label"); + versionLI.appendChild(versionLabel); + versionLabel.setAttribute("for", "editContextSchemaFormVersionInput"); + versionLabel.innerHTML = "Version: "; + var versionInput = document.createElement("input"); + versionLI.appendChild(versionInput); + versionInput.setAttribute("id", "editContextSchemaFormVersionInput"); + versionInput.setAttribute("type", "text"); + versionInput.setAttribute("name", "editContextSchemaFormVersionInput"); + versionInput.setAttribute("class", "field ebInput"); + versionInput.setAttribute("placeholder", "0.0.1"); + if (contextSchema && contextSchema.key && contextSchema.key.version) { + versionInput.value = contextSchema.key.version; + } + if (createEditOrView != "CREATE") { + versionInput.readOnly = true; + } + + var uuidLI = document.createElement("li"); + formul.appendChild(uuidLI); + var uuidLabel = document.createElement("label"); + uuidLI.appendChild(uuidLabel); + uuidLabel.setAttribute("for", "editContextSchemaFormUuidInput"); + uuidLabel.innerHTML = "UUID: "; + var uuidInput = document.createElement("input"); + uuidLI.appendChild(uuidInput); + uuidInput.setAttribute("id", "editContextSchemaFormUuidInput"); + uuidInput.setAttribute("type", "text"); + uuidInput.setAttribute("name", "editContextSchemaFormUuidInput"); + uuidInput.setAttribute("class", "field-long ebInput ebInput_width_full"); + uuidInput.setAttribute("placeholder", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"); + if (contextSchema && contextSchema.uuid) { + uuidInput.value = contextSchema.uuid; + } + if (createEditOrView != "CREATE") { + uuidInput.readOnly = true; + } + + var descriptionLI = document.createElement("li"); + formul.appendChild(descriptionLI); + var descriptionLabel = document.createElement("label"); + descriptionLI.appendChild(descriptionLabel); + descriptionLabel.setAttribute("for", "editContextSchemaFormDescriptionTextArea"); + descriptionLabel.innerHTML = "Description: "; + var descriptionTextArea = document.createElement("textarea"); + descriptionLI.appendChild(descriptionTextArea); + descriptionTextArea.setAttribute("id", "editContextSchemaFormDescriptionTextArea"); + descriptionTextArea.setAttribute("name", "editContextSchemaFormDescriptionTextArea"); + descriptionTextArea.setAttribute("class", "field-long field-textarea ebTextArea ebTextArea_width_full"); + if (contextSchema && contextSchema.description) { + descriptionTextArea.value = contextSchema.description; + } + if (createEditOrView != "CREATE" && createEditOrView != "EDIT") { + descriptionTextArea.readOnly = true; + } + + var schemaFlavourLI = document.createElement("li"); + formul.appendChild(schemaFlavourLI); + var schemaFlavourLabel = document.createElement("label"); + schemaFlavourLI.appendChild(schemaFlavourLabel); + schemaFlavourLabel.setAttribute("for", "editContextSchemaFormSchemaFlavourInput"); + schemaFlavourLabel.innerHTML = "Schema Flavour: "; + var schemaFlavourInput = document.createElement("input"); + schemaFlavourLI.appendChild(schemaFlavourInput); + schemaFlavourInput.setAttribute("id", "editContextSchemaFormSchemaFlavourInput"); + schemaFlavourInput.setAttribute("type", "text"); + schemaFlavourInput.setAttribute("name", "editContextSchemaFormSchemaFlavourInput"); + schemaFlavourInput.setAttribute("class", "field-long ebInput ebInput_width_full"); + schemaFlavourInput.setAttribute("placeholder", "Java"); + if (contextSchema && contextSchema.schemaFlavour) { + schemaFlavourInput.value = contextSchema.schemaFlavour; + } + if (createEditOrView != "CREATE" && createEditOrView != "EDIT") { + schemaFlavourInput.readOnly = true; + } + + var schemaDefinitionLI = document.createElement("li"); + formul.appendChild(schemaDefinitionLI); + var schemaDefinitionLabel = document.createElement("label"); + schemaDefinitionLI.appendChild(schemaDefinitionLabel); + schemaDefinitionLabel.setAttribute("for", "editContextSchemaFormSchemaDefinitionInput"); + schemaDefinitionLabel.innerHTML = "Schema Definition: "; + var schemaDefinitionInput = document.createElement("textarea"); + schemaDefinitionLI.appendChild(schemaDefinitionInput); + schemaDefinitionInput.setAttribute("id", "editContextSchemaFormSchemaDefinitionInput"); + schemaDefinitionInput.setAttribute("type", "text"); + schemaDefinitionInput.setAttribute("name", "editContextSchemaFormSchemaDefinitionInput"); + schemaDefinitionInput.setAttribute("class", "field-long field-textarea ebTextArea ebTextArea_width_full"); + schemaDefinitionInput.setAttribute("placeholder", "java.lang.String"); + if (contextSchema && contextSchema.schemaDefinition) { + schemaDefinitionInput.value = contextSchema.schemaDefinition; + } + if (createEditOrView != "CREATE" && createEditOrView != "EDIT") { + schemaDefinitionInput.readOnly = true; + } + + var inputLI = document.createElement("li"); + formul.appendChild(inputLI); + if (createEditOrView == "CREATE") { + var generateUUIDInput = document.createElement("button"); + inputLI.appendChild(generateUUIDInput); + generateUUIDInput.setAttribute("id", "generateUUID"); + generateUUIDInput.setAttribute("class", "ebBtn ebBtn_large"); + generateUUIDInput.setAttribute("type", "submit"); + generateUUIDInput.setAttribute("value", "Generate UUID"); + generateUUIDInput.onclick = editContextSchemaForm_generateUUIDPressed; + generateUUIDInput.innerHTML = generateUUIDInput.getAttribute("value"); + var inputSpan0 = document.createElement("span"); + inputLI.appendChild(inputSpan0); + inputSpan0.setAttribute("class", "required"); + inputSpan0.innerHTML = " "; + } + if (createEditOrView == "CREATE") { + var generateDescriptionInput = document.createElement("button"); + inputLI.appendChild(generateDescriptionInput); + generateDescriptionInput.setAttribute("id", "generateDescription"); + generateDescriptionInput.setAttribute("class", "ebBtn ebBtn_large"); + generateDescriptionInput.setAttribute("type", "submit"); + generateDescriptionInput.setAttribute("value", "Generate Description"); + generateDescriptionInput.onclick = editContextSchemaForm_generateDescriptionPressed; + generateDescriptionInput.innerHTML = generateDescriptionInput.getAttribute("value"); + + var inputSpan1 = document.createElement("span"); + inputLI.appendChild(inputSpan1); + inputSpan1.setAttribute("class", "required"); + inputSpan1.innerHTML = " "; + } + + var cancelInput = document.createElement("button"); + inputLI.appendChild(cancelInput); + cancelInput.setAttribute("id", "cancel"); + cancelInput.setAttribute("class", "ebBtn ebBtn_large"); + cancelInput.setAttribute("type", "submit"); + cancelInput.setAttribute("value", "Cancel"); + cancelInput.onclick = editContextSchemaForm_cancelPressed; + cancelInput.innerHTML = cancelInput.getAttribute("value"); + + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var inputSpan2 = document.createElement("span"); + inputLI.appendChild(inputSpan2); + inputSpan2.setAttribute("class", "required"); + inputSpan2.innerHTML = " "; + + var submitInput = document.createElement("button"); + inputLI.appendChild(submitInput); + submitInput.setAttribute("id", "submit"); + submitInput.setAttribute("class", "ebBtn ebBtn_large"); + submitInput.setAttribute("type", "submit"); + submitInput.setAttribute("value", "Submit"); + submitInput.onclick = editContextSchemaForm_submitPressed; + submitInput.innerHTML = submitInput.getAttribute("value"); + } + + formParent.appendChild(contentelement); + scrollToTop(); +} + +function editContextSchemaForm_generateUUIDPressed() { + document.getElementById("editContextSchemaFormUuidInput").value = formUtils_generateUUID(); +} + +function editContextSchemaForm_generateDescriptionPressed() { + document.getElementById("editContextSchemaFormDescriptionTextArea").value = formUtils_generateDescription(document + .getElementById("editContextSchemaFormNameInput").value, document + .getElementById("editContextSchemaFormVersionInput").value, document + .getElementById("editContextSchemaFormUuidInput").value); +} + +function editContextSchemaForm_cancelPressed() { + apexUtils_removeElement("editContextSchemaFormDiv"); + contextSchemaTab_reset(); +} + +function editContextSchemaForm_submitPressed() { + var createEditOrView = $('#editContextSchemaForm').attr("createEditOrView"); + if (!createEditOrView || createEditOrView == "" || (createEditOrView != "CREATE" && createEditOrView != "EDIT")) { + console.error("Invalid operation \"" + createEditOrView + + "\" passed to editContextSchemaForm_submitPressed function. Edit failed"); + apexUtils_removeElement("editContextSchemaFormDiv"); + contextSchemaTab_reset(); + return; + } + + var name = $('#editContextSchemaFormNameInput').val(); + var version = $('#editContextSchemaFormVersionInput').val() + + var jsonString = JSON.stringify({ + "name" : name, + "version" : version, + "uuid" : $('#editContextSchemaFormUuidInput').val(), + "description" : $('#editContextSchemaFormDescriptionTextArea').val(), + "schemaFlavour" : $('#editContextSchemaFormSchemaFlavourInput').val(), + "schemaDefinition" : $('#editContextSchemaFormSchemaDefinitionInput').val(), + }); + + if (createEditOrView == "CREATE") { + var requestURL = restRootURL + "/ContextSchema/Create"; + ajax_post(requestURL, jsonString, function(resultData) { + apexUtils_removeElement("editContextSchemaFormDiv"); + contextSchemaTab_reset(); + keyInformationTab_reset() + }); + } else if (createEditOrView == "EDIT") { + var requestURL = restRootURL + "/ContextSchema/Update"; + ajax_put(requestURL, jsonString, function(resultData) { + apexUtils_removeElement("editContextSchemaFormDiv"); + contextSchemaTab_reset(); + keyInformationTab_reset() + }); + } + +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaTab.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaTab.js new file mode 100644 index 0000000..1c8b85e --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaTab.js @@ -0,0 +1,105 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function contextSchemaTab_reset() { + contextSchemaTab_deactivate(); + contextSchemaTab_activate(); +} +function contextSchemaTab_activate() { + contextSchemaTab_create(); + + var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + + ajax_get(requestURL, function(data) { + $("#contextSchemaTableBody").find("tr:gt(0)").remove(); + + for (var i = 0; i < data.messages.message.length; i++) { + var contextSchema = JSON.parse(data.messages.message[i]).apexContextSchema; + + var contextSchemaRow_tr = document.createElement("tr"); + var contextSchemaid = contextSchema.key.name + ":" + contextSchema.key.version; + + var contextSchemaRow = + "" + + contextSchemaid + + "" + + "" + + contextSchema.schemaFlavour + + "" + + "" + + apexUtils_escapeHtml(contextSchema.schemaDefinition) + + ""; + + contextSchemaRow_tr.innerHTML = contextSchemaRow; + contextSchemaRow_tr.addEventListener('contextmenu', rightClickMenu_scopePreserver("contextSchemaTabContent", "ContextSchema", contextSchema.key.name, contextSchema.key.version)); + + $("#contextSchemaTableBody").append(contextSchemaRow_tr); + } + }); +} + +function contextSchemaTab_deactivate() { + apexUtils_removeElement("contextSchemaTabContent"); +} + +function contextSchemaTab_create() { + var contextSchemaTab = document.getElementById("contextSchemasTab"); + + var contextSchemaTabContent = document.getElementById("contextSchemaTabContent"); + if (contextSchemaTabContent != null) { + return + } + + var contextSchemaTabContent = document.createElement("contextSchemaTabContent"); + contextSchemaTab.appendChild(contextSchemaTabContent); + contextSchemaTabContent.setAttribute("id", "contextSchemaTabContent"); + contextSchemaTabContent.addEventListener('contextmenu', rightClickMenu_scopePreserver("contextSchemaTabContent", "ContextSchema",null,null)); + + var contextSchemaTable = createTable("contextSchemaTable"); + contextSchemaTabContent.appendChild(contextSchemaTable); + + var contextSchemaTableHeader = document.createElement("thead"); + contextSchemaTable.appendChild(contextSchemaTableHeader); + contextSchemaTableHeader.setAttribute("id", "contextSchemaTableHeader"); + + var contextSchemaTableHeaderRow = document.createElement("tr"); + contextSchemaTableHeader.appendChild(contextSchemaTableHeaderRow); + contextSchemaTableHeaderRow.setAttribute("id", "contextSchemaTableHeaderRow"); + + var contextSchemaTableKeyHeader = document.createElement("th"); + contextSchemaTableHeaderRow.appendChild(contextSchemaTableKeyHeader); + contextSchemaTableKeyHeader.setAttribute("id", "contextSchemaTableKeyHeader"); + contextSchemaTableKeyHeader.appendChild(document.createTextNode("Context Item")); + + var contextSchemaTableSchemaFlavourHeader = document.createElement("th"); + contextSchemaTableHeaderRow.appendChild(contextSchemaTableSchemaFlavourHeader); + contextSchemaTableSchemaFlavourHeader.setAttribute("id", "contextSchemaTableJavatypeHeader"); + contextSchemaTableSchemaFlavourHeader.appendChild(document.createTextNode("Schema Flavour")); + + var contextSchemaTableSchemaDefHeader = document.createElement("th"); + contextSchemaTableHeaderRow.appendChild(contextSchemaTableSchemaDefHeader); + contextSchemaTableSchemaDefHeader.setAttribute("id", "contextSchemaTableJavatypeHeader"); + contextSchemaTableSchemaDefHeader.appendChild(document.createTextNode("Context Item Schema Definition")); + + var contextSchemaTableBody = document.createElement("tbody"); + contextSchemaTable.appendChild(contextSchemaTableBody); + contextSchemaTable.setAttribute("id", "contextSchemaTableBody"); +} \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventEditForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventEditForm.js new file mode 100644 index 0000000..51408e3 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventEditForm.js @@ -0,0 +1,566 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function editEventForm_deleteEvent(parent, name, version) { + var message = "Are you sure you want to delete Event \"" + name + ":" + version + "\"?"; + if (apexUtils_areYouSure(message)) { + var requestURL = restRootURL + "/Event/Delete?name=" + name + "&version=" + version; + ajax_delete(requestURL, function(data) { + apexUtils_removeElement("editEventFormDiv"); + eventTab_reset(); + keyInformationTab_reset() + }); + } +} + +function editEventForm_viewEvent(formParent, name, version) { + editEventForm_editEvent_inner(formParent, name, version, "VIEW"); +} + +function editEventForm_editEvent(formParent, name, version) { + editEventForm_editEvent_inner(formParent, name, version, "EDIT"); +} + +function editEventForm_createEvent(formParent) { + // Get all contextSchemas too for event params + var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var contextSchemas = new Array(); + ajax_get(requestURL, function(data2) { + for (var i = 0; i < data2.messages.message.length; i++) { + var contextSchema = JSON.parse(data2.messages.message[i]).apexContextSchema; + var dt = { + "name" : contextSchema.key.name, + "version" : contextSchema.key.version, + "displaytext" : contextSchema.key.name + ":" + contextSchema.key.version, + "contextSchema" : contextSchema + }; + contextSchemas.push(dt); + } + editEventForm_activate(formParent, "CREATE", null, contextSchemas); + }); +} + +function editEventForm_editEvent_inner(formParent, name, version, viewOrEdit) { + var requestURL = restRootURL + "/Event/Get?name=" + name + "&version=" + version; + ajax_getWithKeyInfo(requestURL, "apexEvent", function(event) { + // Get all contextSchemas too for event params + var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var contextSchemas = new Array(); + ajax_get(requestURL, function(data2) { + for (var i = 0; i < data2.messages.message.length; i++) { + var contextSchema = JSON.parse(data2.messages.message[i]).apexContextSchema; + contextSchemas.push({ + "name" : contextSchema.key.name, + "version" : contextSchema.key.version, + "displaytext" : contextSchema.key.name + ":" + contextSchema.key.version, + "contextSchema" : contextSchema + }); + } + editEventForm_activate(formParent, viewOrEdit, event, contextSchemas); + }); + }); +} + +function editEventForm_activate(parent, operation, event, contextSchemas) { + apexUtils_removeElement("editEventFormDiv"); + var formParent = document.getElementById(parent); + apexUtils_emptyElement(parent); + + var isedit = false; + var createEditOrView = ""; + if (!operation) { + console.warn("No operation specified for EventForm form") + } else { + createEditOrView = operation.toUpperCase() + } + if (createEditOrView == "CREATE") { + isedit = true; + } else if (createEditOrView == "EDIT" || createEditOrView == "VIEW") { + if (createEditOrView == "EDIT") { + isedit = true; + } + + if (!event) { + console.warn("Invalid value (\"" + event + "\") passed as a value for \"event\" for EventForm form."); + } else { + if (!event.key || !event.key.name || event.key.name == "") { + console.warn("Invalid value (\"" + event.key.name + + "\") passed as a value for \"name\" for EventForm form."); + } + if (!event.key || !event.key.version || event.key.version == "") { + console.warn("Invalid value (\"" + event.key.version + + "\") passed as a value for \"version\" for EventForm form."); + } + if (!event.uuid || event.uuid == "") { + console.warn("Invalid value (\"" + event.uuid + + "\") passed as a value for \"uuid\" for EventForm form."); + } + } + } else { + console.warn("Invalid operation (\"" + operation + + "\") specified for EventForm form. Only \"Create\", \"Edit\" and \"View\" operations are supported"); + } + + var contentelement = document.createElement("editEventFormDiv"); + var formDiv = document.createElement("div"); + contentelement.appendChild(formDiv); + formDiv.setAttribute("id", "editEventFormDiv"); + formDiv.setAttribute("class", "editEventFormDiv"); + + var headingSpan = document.createElement("h2"); + formDiv.appendChild(headingSpan); + + headingSpan.innerHTML = "Event Editor"; + + var form = document.createElement("editEventForm"); + formDiv.appendChild(form); + + form.setAttribute("id", "editEventForm"); + form.setAttribute("class", "form-style-1"); + form.setAttribute("method", "post"); + form.setAttribute("createEditOrView", createEditOrView); + + var formul = document.createElement("ul"); + form.appendChild(formul); + + var nameLI = document.createElement("li"); + formul.appendChild(nameLI); + var nameLabel = document.createElement("label"); + nameLI.appendChild(nameLabel); + nameLabel.setAttribute("for", "editEventFormNameInput"); + nameLabel.innerHTML = "Name: "; + var nameLabelSpan = document.createElement("span"); + nameLabel.appendChild(nameLabelSpan); + nameLabelSpan.setAttribute("class", "required"); + nameLabelSpan.innerHTML = "*"; + var nameInput = document.createElement("input"); + nameLI.appendChild(nameInput); + nameInput.setAttribute("id", "editEventFormNameInput"); + nameInput.setAttribute("type", "text"); + nameInput.setAttribute("name", "editEventFormNameInput"); + nameInput.setAttribute("class", "field ebInput"); + nameInput.setAttribute("placeholder", "name"); + if (event && event.key && event.key.name) { + nameInput.value = event.key.name; + } + if (createEditOrView != "CREATE") { + nameInput.readOnly = true; + } + + var versionLI = document.createElement("li"); + formul.appendChild(versionLI); + var versionLabel = document.createElement("label"); + versionLI.appendChild(versionLabel); + versionLabel.setAttribute("for", "editEventFormVersionInput"); + versionLabel.innerHTML = "Version: "; + var versionInput = document.createElement("input"); + versionLI.appendChild(versionInput); + versionInput.setAttribute("id", "editEventFormVersionInput"); + versionInput.setAttribute("type", "text"); + versionInput.setAttribute("name", "editEventFormVersionInput"); + versionInput.setAttribute("class", "field ebInput"); + versionInput.setAttribute("placeholder", "0.0.1"); + if (event && event.key && event.key.version) { + versionInput.value = event.key.version; + } + if (createEditOrView != "CREATE") { + versionInput.readOnly = true; + } + + var uuidLI = document.createElement("li"); + formul.appendChild(uuidLI); + var uuidLabel = document.createElement("label"); + uuidLI.appendChild(uuidLabel); + uuidLabel.setAttribute("for", "editEventFormUuidInput"); + uuidLabel.innerHTML = "UUID: "; + var uuidInput = document.createElement("input"); + uuidLI.appendChild(uuidInput); + uuidInput.setAttribute("id", "editEventFormUuidInput"); + uuidInput.setAttribute("type", "text"); + uuidInput.setAttribute("name", "editEventFormUuidInput"); + uuidInput.setAttribute("class", "field-long ebInput ebInput_width_full"); + uuidInput.setAttribute("placeholder", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"); + if (event && event.uuid) { + uuidInput.value = event.uuid; + } + if (createEditOrView != "CREATE") { + uuidInput.readOnly = true; + } + + var descriptionLI = document.createElement("li"); + formul.appendChild(descriptionLI); + var descriptionLabel = document.createElement("label"); + descriptionLI.appendChild(descriptionLabel); + descriptionLabel.setAttribute("for", "editEventFormDescriptionTextArea"); + descriptionLabel.innerHTML = "Description: "; + var descriptionTextArea = document.createElement("textarea"); + descriptionLI.appendChild(descriptionTextArea); + descriptionTextArea.setAttribute("id", "editEventFormDescriptionTextArea"); + descriptionTextArea.setAttribute("name", "editEventFormDescriptionTextArea"); + descriptionTextArea.setAttribute("class", "field-long field-textarea ebTextArea ebTextArea_width_full"); + if (event && event.description) { + descriptionTextArea.value = event.description; + } + if (createEditOrView != "CREATE" && createEditOrView != "EDIT") { + descriptionTextArea.readOnly = true; + } + + var namespaceLI = document.createElement("li"); + formul.appendChild(namespaceLI); + var namespaceLabel = document.createElement("label"); + namespaceLI.appendChild(namespaceLabel); + namespaceLabel.setAttribute("for", "editEventFormNamespaceInput"); + namespaceLabel.innerHTML = "Namespace: "; + var namespaceInput = document.createElement("input"); + namespaceLI.appendChild(namespaceInput); + namespaceInput.setAttribute("id", "editEventFormNamespaceInput"); + namespaceInput.setAttribute("type", "text"); + namespaceInput.setAttribute("name", "editEventFormNamespaceInput"); + namespaceInput.setAttribute("class", "field-namespace ebInput ebInput ebInput_width_full"); + namespaceInput.setAttribute("placeholder", ""); + if (event && event.nameSpace) { + namespaceInput.value = event.nameSpace; + } + if (createEditOrView != "CREATE" && createEditOrView != "EDIT") { + namespaceInput.readOnly = true; + } + + var sourceLI = document.createElement("li"); + formul.appendChild(sourceLI); + var sourceLabel = document.createElement("label"); + sourceLI.appendChild(sourceLabel); + sourceLabel.setAttribute("for", "editEventFormSourceInput"); + sourceLabel.innerHTML = "Source: "; + var sourceInput = document.createElement("input"); + sourceLI.appendChild(sourceInput); + sourceInput.setAttribute("id", "editEventFormSourceInput"); + sourceInput.setAttribute("type", "text"); + sourceInput.setAttribute("name", "editEventFormSourceInput"); + sourceInput.setAttribute("class", "field-source ebInput"); + sourceInput.setAttribute("placeholder", ""); + if (event && event.source) { + sourceInput.value = event.source; + } + if (createEditOrView != "CREATE" && createEditOrView != "EDIT") { + sourceInput.readOnly = true; + } + + var targetLI = document.createElement("li"); + formul.appendChild(targetLI); + var targetLabel = document.createElement("label"); + targetLI.appendChild(targetLabel); + targetLabel.setAttribute("for", "editEventFormTargetInput"); + targetLabel.innerHTML = "Target: "; + var targetInput = document.createElement("input"); + targetLI.appendChild(targetInput); + targetInput.setAttribute("id", "editEventFormTargetInput"); + targetInput.setAttribute("type", "text"); + targetInput.setAttribute("name", "editEventFormTargetInput"); + targetInput.setAttribute("class", "field-target ebInput"); + targetInput.setAttribute("placeholder", ""); + if (event && event.target) { + targetInput.value = event.target; + } + if (createEditOrView != "CREATE" && createEditOrView != "EDIT") { + targetInput.readOnly = true; + } + + var parametersLI = document.createElement("li"); + formul.appendChild(parametersLI); + var parametersLabel = document.createElement("label"); + parametersLI.appendChild(parametersLabel); + parametersLabel.setAttribute("for", "editEventFormParametersTable"); + parametersLabel.innerHTML = "Event Parameters: "; + var paramstable = document.createElement("table"); + paramstable.setAttribute("id", "editEventFormParametersTable"); + paramstable.setAttribute("name", "editEventFormParametersTable"); + paramstable.setAttribute("class", "table-eventparam"); + parametersLI.appendChild(paramstable); + var paramstable_head = document.createElement("thead"); + paramstable.appendChild(paramstable_head); + var paramstable_head_tr = document.createElement("tr"); + paramstable_head.appendChild(paramstable_head_tr); + paramstable_head_tr.appendChild(document.createElement("th")); // empty, + // for + // delete + // button + paramstable_head_th = document.createElement("th"); + paramstable_head_tr.appendChild(paramstable_head_th); + paramstable_head_th.innerHTML = "Parameter Name: "; + paramstable_head_th.setAttribute("class", "table-eventparam-heading form-heading"); + paramstable_head_th = document.createElement("th"); + paramstable_head_tr.appendChild(paramstable_head_th); + paramstable_head_th.innerHTML = "Parameter Type/Schema: "; + paramstable_head_th.setAttribute("class", "table-eventparam-heading form-heading"); + paramstable_head_th = document.createElement("th"); + paramstable_head_tr.appendChild(paramstable_head_th); + paramstable_head_th.innerHTML = "Optional: "; + paramstable_head_th.setAttribute("class", "table-eventparam-heading form-heading"); + var paramstable_body = document.createElement("tbody"); + paramstable.appendChild(paramstable_body); + // Add the parameters + if (event && event.parameter && event.parameter.entry) { + for (var p = 0; p < event.parameter.entry.length; p++) { + var fieldEntry = event.parameter.entry[p]; + var contextSchema = fieldEntry.value.fieldSchemaKey; + var optional = fieldEntry.value.optional; + contextSchema["displaytext"] = contextSchema.name + ":" + contextSchema.version; + editEventForm_addEventParam(paramstable_body, (createEditOrView == "VIEW"), fieldEntry.key, optional, + contextSchema, contextSchemas); + } + } + // add the New Parameter button + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var paramTR = document.createElement("tr"); + paramTR.setAttribute("class", "field-eventparam-tr.new"); + paramstable_body.appendChild(paramTR); + var paramTD = document.createElement("td"); + paramTD.setAttribute("colspan", "4"); + paramTR.appendChild(paramTD); + var addParamInput = createAddFormButton(); + paramTD.appendChild(addParamInput); + addParamInput.onclick = function() { + editEventForm_addEventParam(paramstable_body, false, null, false, null, contextSchemas); + }; + } + + var inputLI = document.createElement("li"); + formul.appendChild(inputLI); + if (createEditOrView == "CREATE") { + var generateUUIDInput = document.createElement("button"); + inputLI.appendChild(generateUUIDInput); + generateUUIDInput.setAttribute("id", "generateUUID"); + generateUUIDInput.setAttribute("class", "ebBtn ebBtn_large"); + generateUUIDInput.setAttribute("type", "submit"); + generateUUIDInput.setAttribute("value", "Generate UUID"); + generateUUIDInput.onclick = editEventForm_generateUUIDPressed; + generateUUIDInput.innerHTML = generateUUIDInput.getAttribute("value"); + + var inputSpan0 = document.createElement("span"); + inputLI.appendChild(inputSpan0); + inputSpan0.setAttribute("class", "required"); + inputSpan0.innerHTML = " "; + } + if (createEditOrView == "CREATE") { + var generateDescriptionInput = document.createElement("button"); + inputLI.appendChild(generateDescriptionInput); + generateDescriptionInput.setAttribute("id", "generateDescription"); + generateDescriptionInput.setAttribute("class", "ebBtn ebBtn_large"); + generateDescriptionInput.setAttribute("type", "submit"); + generateDescriptionInput.setAttribute("value", "Generate Description"); + generateDescriptionInput.onclick = editEventForm_generateDescriptionPressed; + generateDescriptionInput.innerHTML = generateDescriptionInput.getAttribute("value"); + var inputSpan1 = document.createElement("span"); + inputLI.appendChild(inputSpan1); + inputSpan1.setAttribute("class", "required"); + inputSpan1.innerHTML = " "; + } + + var cancelInput = document.createElement("button"); + inputLI.appendChild(cancelInput); + cancelInput.setAttribute("id", "cancel"); + cancelInput.setAttribute("class", "ebBtn ebBtn_large"); + cancelInput.setAttribute("type", "submit"); + cancelInput.setAttribute("value", "Cancel"); + cancelInput.onclick = editEventForm_cancelPressed; + cancelInput.innerHTML = cancelInput.getAttribute("value"); + + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var inputSpan2 = document.createElement("span"); + inputLI.appendChild(inputSpan2); + inputSpan2.setAttribute("class", "required"); + inputSpan2.innerHTML = " "; + var submitInput = document.createElement("button"); + inputLI.appendChild(submitInput); + submitInput.setAttribute("id", "submit"); + submitInput.setAttribute("class", "ebBtn ebBtn_large"); + submitInput.setAttribute("type", "submit"); + submitInput.setAttribute("value", "Submit"); + + submitInput.onclick = editEventForm_submitPressed; + submitInput.innerHTML = submitInput.getAttribute("value") + } + + formParent.appendChild(contentelement); + scrollToTop(); +} + +function editEventForm_addEventParam(parentTBody, disabled, name, optional, contextSchema, contextSchemas) { + var random_suffix = formUtils_generateUUID(); + + var paramTR = parentTBody.insertRow(parentTBody.rows.length - 1); + paramTR.setAttribute("param_id", random_suffix); + paramTR.setAttribute("class", "field-eventparam-tr"); + if (name == null && contextSchema == null && !disabled) { + paramTR.setAttribute("class", "field-eventparam-tr.new field-add-new"); + $(paramTR).show("fast"); + } + var deleteTD = document.createElement("td"); + paramTR.appendChild(deleteTD); + var deleteDiv = document.createElement("div"); + deleteTD.appendChild(deleteDiv); + if (!disabled) { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete"); + deleteDiv.onclick = function(event) { + $(paramTR).hide("fast", function() { + paramTR.parentNode.removeChild(paramTR); + }); + }; + } else { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete ebIcon_disabled"); + } + + var nameTD = document.createElement("td"); + paramTR.appendChild(nameTD); + var nameInput = document.createElement("input"); + nameTD.appendChild(nameInput); + nameInput.setAttribute("id", "editEventFormParamName" + "_" + random_suffix); + nameInput.setAttribute("type", "text"); + nameInput.setAttribute("name", "editEventFormParamName" + "_" + random_suffix); + nameInput.setAttribute("class", "field-eventparam-name ebInput ebInput_width_xLong"); + if (name == null && contextSchema == null && !disabled) { + nameInput.setAttribute("class", "field-eventparam-name.new ebInput ebInput_width_xLong"); + } + nameInput.setAttribute("placeholder", "Parameter Name"); + if (name) { + nameInput.value = name; + } + nameInput.readOnly = disabled; + + var contextSchemaTD = document.createElement("td"); + paramTR.appendChild(contextSchemaTD); + + var selectDiv = dropdownList("editEventFormParamContextSchema" + "_" + random_suffix, contextSchemas, + contextSchema, disabled, null) + contextSchemaTD.appendChild(selectDiv); + + var paramOptionalTD = document.createElement("td"); + paramOptionalTD.setAttribute("class", "field-checkbox-center"); + paramTR.appendChild(paramOptionalTD); + var paramOptionalInput = document.createElement("input"); + paramOptionalInput.setAttribute("type", "checkbox"); + paramOptionalInput.setAttribute("id", "editEventFormParamOptional" + "_" + random_suffix); + paramOptionalInput.setAttribute("name", "editEventFormParamOptional" + "_" + random_suffix); + paramOptionalInput.setAttribute("class", "field-eventparam-optional"); + if (name == null && contextSchema == null && !disabled) { + paramOptionalInput.setAttribute("class", "field-eventparam-optional.new"); + } + if (optional == true) { + paramOptionalInput.checked = true; + } else { + paramOptionalInput.checked = false; + } + paramOptionalInput.disabled = disabled; + paramOptionalTD.appendChild(paramOptionalInput); +} + +function editEventForm_generateUUIDPressed() { + document.getElementById("editEventFormUuidInput").value = formUtils_generateUUID(); +} + +function editEventForm_generateDescriptionPressed() { + document.getElementById("editEventFormDescriptionTextArea").value = formUtils_generateDescription(document + .getElementById("editEventFormNameInput").value, + document.getElementById("editEventFormVersionInput").value, document + .getElementById("editEventFormUuidInput").value); +} + +function editEventForm_cancelPressed() { + apexUtils_removeElement("editEventFormDiv"); + eventTab_reset(); +} + +function editEventForm_submitPressed() { + var createEditOrView = document.getElementById("editEventForm").getAttribute("createEditOrView"); + if (!createEditOrView || createEditOrView == "" || (createEditOrView != "CREATE" && createEditOrView != "EDIT")) { + console.error("Invalid operation \"" + createEditOrView + + "\" passed to editEventForm_submitPressed function. Edit failed"); + apexUtils_removeElement("editEventFormDiv"); + eventTab_reset(); + return; + } + + var name = document.getElementById('editEventFormNameInput').value; + var version = document.getElementById('editEventFormVersionInput').value; + + var eventbean_params = null; + // get the event parameters + var paramstablerows = document.getElementById("editEventFormParametersTable").rows; + if (paramstablerows && paramstablerows.length >= 2) { + eventbean_params = new Object(); + for (var i = 1; i < paramstablerows.length - 1; i++) { + var paramTR = paramstablerows[i]; + if (paramTR && paramTR.getAttribute("param_id")) { + var param_id = paramTR.getAttribute("param_id"); + var paramname = document.getElementById("editEventFormParamName" + "_" + param_id).value; + var paramoptional = document.getElementById("editEventFormParamOptional" + "_" + param_id).checked; + var param_dt = document.getElementById("editEventFormParamContextSchema" + "_" + param_id + + "_dropdownList").selectedOption; + if (eventbean_params[paramname]) { + alert("Event \"" + name + "\" contains more than one Parameter called \"" + paramname + "\""); + return false; + } + if (param_dt == null) { + alert("Event \"" + name + "\" has no selected Context Item Schema for the Parameter called \"" + + paramname + "\""); + return false; + } + var param_dt_name = param_dt.name; + var param_dt_version = param_dt.version; + eventbean_params[paramname] = { + "localName" : paramname, + "name" : param_dt_name, + "version" : param_dt_version, + "optional" : paramoptional + }; + } + } + } + // generate an event bean to json-ify and send in rest request + var eventbean = { + "name" : name, + "version" : version, + "uuid" : document.getElementById('editEventFormUuidInput').value, + "description" : document.getElementById('editEventFormDescriptionTextArea').value, + "source" : document.getElementById('editEventFormSourceInput').value, + "target" : document.getElementById('editEventFormTargetInput').value, + "nameSpace" : document.getElementById('editEventFormNamespaceInput').value, + "parameters" : eventbean_params + } + var jsonString = JSON.stringify(eventbean); + + if (createEditOrView == "CREATE") { + var requestURL = restRootURL + "/Event/Create"; + ajax_post(requestURL, jsonString, function(resultData) { + apexUtils_removeElement("editEventFormDiv"); + eventTab_reset(); + keyInformationTab_reset() + }); + } else if (createEditOrView == "EDIT") { + var requestURL = restRootURL + "/Event/Update"; + ajax_put(requestURL, jsonString, function(resultData) { + apexUtils_removeElement("editEventFormDiv"); + eventTab_reset(); + keyInformationTab_reset() + }); + } + +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventTab.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventTab.js new file mode 100644 index 0000000..a5e0126 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventTab.js @@ -0,0 +1,139 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function eventTab_reset() { + eventTab_deactivate(); + eventTab_activate(); +} + +function eventTab_activate() { + eventTab_create(); + + var requestURL = restRootURL + "/Event/Get?name=&version="; + + ajax_get(requestURL, function(data) { + $("#eventTableBody").find("tr:gt(0)").remove(); + + + for (var i = 0; i < data.messages.message.length; i++) { + var event = JSON.parse(data.messages.message[i]).apexEvent; + + var eventTableRow_tr = document.createElement("tr"); + var eventid = event.key.name + ":" + event.key.version; + + var eventTableRow = + "" + + eventid + + "" + + "" + + event.nameSpace + + "" + + "" + + event.source + + "" + + "" + + event.target + + ""; + + eventTableRow += ""; + + for (var p = 0; p < event.parameter.entry.length; p++) { + var fieldEntry = event.parameter.entry[p]; + + eventTableRow += + "" + + ""; + } + + eventTableRow += "
ParameterParameter Type/SchemaOptional
" + + fieldEntry.key + + "" + + fieldEntry.value.fieldSchemaKey.name + ":" + fieldEntry.value.fieldSchemaKey.version + + "" + + fieldEntry.value.optional + + "
"; + + eventTableRow_tr.innerHTML = eventTableRow; + + eventTableRow_tr.addEventListener('contextmenu', rightClickMenu_scopePreserver("eventTabContent", "Event", event.key.name, event.key.version)); + + $("#eventTableBody").append(eventTableRow_tr); + } + }); +} + +function eventTab_deactivate() { + apexUtils_removeElement("eventTabContent"); +} + +function eventTab_create() { + var eventTab = document.getElementById("eventsTab"); + + var eventTabContent = document.getElementById("eventTabContent"); + if (eventTabContent != null) { + return + } + + var eventTabContent = document.createElement("eventTabContent"); + eventTab.appendChild(eventTabContent); + eventTabContent.setAttribute("id", "eventTabContent"); + eventTabContent.addEventListener('contextmenu', rightClickMenu_scopePreserver("eventTabContent", "Event", null, null)); + + var eventTable = createTable("eventTable"); + eventTabContent.appendChild(eventTable); + + var eventTableHeader = document.createElement("thead"); + eventTable.appendChild(eventTableHeader); + eventTableHeader.setAttribute("id", "eventTableHeader"); + + var eventTableHeaderRow = document.createElement("tr"); + eventTableHeader.appendChild(eventTableHeaderRow); + eventTableHeaderRow.setAttribute("id", "eventTableHeaderRow"); + + var eventTableKeyHeader = document.createElement("th"); + eventTableHeaderRow.appendChild(eventTableKeyHeader); + eventTableKeyHeader.setAttribute("id", "eventTableKeyHeader"); + eventTableKeyHeader.appendChild(document.createTextNode("Event")); + + var eventTableNamespaceHeader = document.createElement("th"); + eventTableHeaderRow.appendChild(eventTableNamespaceHeader); + eventTableNamespaceHeader.setAttribute("id", "eventTableNamespaceHeader"); + eventTableNamespaceHeader.appendChild(document.createTextNode("Name Space")); + + var eventTableSourceHeader = document.createElement("th"); + eventTableHeaderRow.appendChild(eventTableSourceHeader); + eventTableSourceHeader.setAttribute("id", "eventTableSourceHeader"); + eventTableSourceHeader.appendChild(document.createTextNode("Source")); + + var eventTableTargetHeader = document.createElement("th"); + eventTableHeaderRow.appendChild(eventTableTargetHeader); + eventTableTargetHeader.setAttribute("id", "eventTableTargetHeader"); + eventTableTargetHeader.appendChild(document.createTextNode("Target")); + + var eventTableParameterHeader = document.createElement("th"); + eventTableHeaderRow.appendChild(eventTableParameterHeader); + eventTableParameterHeader.setAttribute("id", "eventTableParameterHeader"); + eventTableParameterHeader.appendChild(document.createTextNode("Parameters")); + + var eventTableBody = document.createElement("tbody"); + eventTable.appendChild(eventTableBody); + eventTable.setAttribute("id", "eventTableBody"); +} \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js new file mode 100644 index 0000000..89a0f86 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js @@ -0,0 +1,51 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function files_fileOpen() { + $('').on('change', function() { + var reader = new FileReader(); + modelFileName = this.files[0].name; + reader.readAsText(this.files[0]); + + reader.onload = function(event) { + var requestURL = restRootURL + "/Model/Load"; + ajax_put(requestURL, event.target.result, function(resultData) { + localStorage.setItem("apex_model_loaded", true); + var requestURL = restRootURL + "/Model/GetKey"; + ajax_get(requestURL, function(data) { + var modelKey = JSON.parse(data.messages.message[0]).apexArtifactKey; + pageControl_modelMode(modelKey.name, modelKey.version, modelFileName); + }); + }); + }; + }).click(); +} + +function files_fileDownload() { + var requestURL = restRootURL + "/Model/Download"; + + var downloadLink = document.createElement("a"); + document.body.appendChild(downloadLink); + downloadLink.download = modelFileName; + downloadLink.href = requestURL; + downloadLink.click(); + document.body.removeChild(downloadLink); +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFormUtils.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFormUtils.js new file mode 100644 index 0000000..c7bf242 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFormUtils.js @@ -0,0 +1,48 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function formUtils_generateUUID() { // Public Domain/MIT + var d = new Date().getTime(); + if (typeof performance !== 'undefined' && typeof performance.now === 'function') { + d += performance.now(); // use high-precision timer if available + } + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random() * 16) % 16 | 0; + d = Math.floor(d / 16); + return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16); + }); +} + +function formUtils_generateDescription(name, version, uuid) { + if (!name) { + name = "null"; + } + if (!version) { + version = "null"; + } + if (!uuid) { + uuid = "null"; + } + + var description = "Generated description for a concept called \"" + name + "\" with version \"" + version + + "\" and UUID \"" + uuid + "\""; + return description; +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexKeyInformationTab.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexKeyInformationTab.js new file mode 100644 index 0000000..3ba1e17 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexKeyInformationTab.js @@ -0,0 +1,105 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function keyInformationTab_reset() { + keyInformationTab_deactivate(); + keyInformationTab_activate(); +} + +function keyInformationTab_activate() { + keyInformationTab_create(); + + var requestURL = restRootURL + "/KeyInformation/Get?name=&version="; + + ajax_get(requestURL, function(data) { + $("#keyInformationTableBody").find("tr:gt(0)").remove(); + + for (var i = 0; i < data.messages.message.length; i++) { + var keyInfo = JSON.parse(data.messages.message[i]).apexKeyInfo; + + var keyInfoRow_tr = document.createElement("tr"); + var keyInfoRow = + "" + + keyInfo.key.name + ":" + keyInfo.key.version + + "" + + "" + + apexUtils_escapeHtml(keyInfo.UUID) + + "" + + "" + + apexUtils_escapeHtml(keyInfo.description) + + ""; + keyInfoRow_tr.innerHTML = keyInfoRow; + // keyInfoRow_tr.addEventListener('contextmenu', + // rightClickMenu_scopePreserver("keyInformationTabContent", + // "KeyInformation", keyInfo.key.name, keyInfo.key.version)); + $("#keyInformationTableBody").append(keyInfoRow_tr); + + } + }); +} + +function keyInformationTab_deactivate() { + apexUtils_removeElement("keyInformationTabContent"); +} + +function keyInformationTab_create() { + var keyInformationTab = document.getElementById("keyInformationTab"); + + var keyInformationTabContent = document.getElementById("keyInformationTabContent"); + if (keyInformationTabContent != null) { + return + } + + var keyInformationTabContent = document.createElement("keyInformationTabContent"); + keyInformationTab.appendChild(keyInformationTabContent); + keyInformationTabContent.setAttribute("id", "keyInformationTabContent"); + + var keyInformationTable = createTable("keyInformationTable"); + keyInformationTable.oncontextmenu = new Function("return false;") + keyInformationTabContent.appendChild(keyInformationTable); + + var keyInformationTableHeader = document.createElement("thead"); + keyInformationTable.appendChild(keyInformationTableHeader); + keyInformationTableHeader.setAttribute("id", "keyInformationTableHeader"); + + var keyInformationTableHeaderRow = document.createElement("tr"); + keyInformationTableHeader.appendChild(keyInformationTableHeaderRow); + keyInformationTableHeaderRow.setAttribute("id", "keyInformationTableHeaderRow"); + + var keyInformationTableKeyHeader = document.createElement("th"); + keyInformationTableHeaderRow.appendChild(keyInformationTableKeyHeader); + keyInformationTableKeyHeader.setAttribute("id", "keyInformationTableKeyHeader"); + keyInformationTableKeyHeader.appendChild(document.createTextNode("Key Information")); + + var keyInformationTableUUIDHeader = document.createElement("th"); + keyInformationTableHeaderRow.appendChild(keyInformationTableUUIDHeader); + keyInformationTableUUIDHeader.setAttribute("id", "keyInformationTableUUIDHeader"); + keyInformationTableUUIDHeader.appendChild(document.createTextNode("UUID")); + + var keyInformationTableDescriptionHeader = document.createElement("th"); + keyInformationTableHeaderRow.appendChild(keyInformationTableDescriptionHeader); + keyInformationTableDescriptionHeader.setAttribute("id", "keyInformationTableDescriptionHeader"); + keyInformationTableDescriptionHeader.appendChild(document.createTextNode("Description")); + + var keyInformationTableBody = document.createElement("tbody"); + keyInformationTable.appendChild(keyInformationTableBody); + keyInformationTable.setAttribute("id", "keyInformationTableBody"); +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexMain.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexMain.js new file mode 100644 index 0000000..e8ad0de --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexMain.js @@ -0,0 +1,169 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +var restRootURL = null; +var modelFileName = null; + +$("#menu").fileMenu({ + slideSpeed : 200 +}); + +$(document).ready(function() { + pageControl_noModelMode(); + main_getRestRootURL(); +}); + +$("#menu li").not(".emptyMessage").click(function() { + switch (this.id) { + case "menuFileNew": + newModelForm_activate(document.getElementById("mainArea")); + break; + + case "menuFileOpen": + files_fileOpen(); + break; + + case "menuFileDownload": + files_fileDownload(); + break; + + case "menuFileClear": + if (confirm("Clear the current model?")) { + var requestURL = restRootURL + "/Model/Delete"; + + ajax_delete(requestURL, function(data) { + localStorage.removeItem("apex_model_loaded"); + localStorage.removeItem("apex_tab_index"); + $("#mainTabs").tabs("option", "active", 0); + pageControl_noModelMode(); + }); + } + break; + + case "menuFileNewSession": + clearLocalStorage(); + location.reload(); + break; + + case "menuFileClose": + if (confirm("Close Apex Editor?")) { + clearLocalStorage(); + window.location.href = window.location.href + "close.html"; + } + break; + + case "menuModelAnalyse": + modelHandling_analyse(); + break; + + case "menuModelValidate": + modelHandling_validate(); + break; + + case "menuConceptsContextSchemas": + $("#mainTabs").tabs("option", "active", 0); + break; + case "menuConceptsEvents": + $("#mainTabs").tabs("option", "active", 1); + break; + case "menuConceptsContextAlbums": + $("#mainTabs").tabs("option", "active", 2); + break; + case "menuConceptsTasks": + $("#mainTabs").tabs("option", "active", 3); + break; + case "menuConceptsPolicies": + $("#mainTabs").tabs("option", "active", 4); + break; + case "menuConceptsKeyInformation": + $("#mainTabs").tabs("option", "active", 5); + break; + + default: + break; + } +}); + +function main_getRestRootURL() { + var href = location.protocol + + "//" + + window.location.hostname + + (location.port ? ':' + location.port : '') + + (location.pathname.endsWith("/editor/") ? location.pathname.substring(0, location.pathname + .indexOf("editor/")) : location.pathname); + var restContext = "apexservices/editor/"; + if (localStorage.getItem("apex_session")) { + restRootURL = href + restContext + localStorage.getItem("apex_session"); + var requestURL = restRootURL + "/Model/GetKey"; + ajax_get(requestURL, function(data) { + $("#statusMessageTable").append(" REST root URL set to: " + restRootURL + ""); + if (localStorage.getItem("apex_model_loaded")) { + var modelKey = JSON.parse(data.messages.message[0]).apexArtifactKey; + pageControl_modelMode(modelKey.name, modelKey.version, modelFileName); + if (localStorage.getItem("apex_tab_index")) { + $("#mainTabs").tabs({ + active: localStorage.getItem("apex_tab_index") + }); + } + } + }); + } else { + var createSessionURL = href + restContext + "-1/Session/Create"; + + ajax_get(createSessionURL, function(data) { + localStorage.setItem("apex_session", data.messages.message[0]); + restRootURL = href + restContext + localStorage.getItem("apex_session"); + $("#statusMessageTable").append(" REST root URL set to: " + restRootURL + ""); + }); + } +} + +function clearLocalStorage() { + localStorage.removeItem("apex_session"); + localStorage.removeItem("apex_model_loaded"); + localStorage.removeItem("apex_tab_index"); +} + +/* Inline Message */ +var ebInlineMessageHeight = $(".ebInlineMessage").height(); + +$(".ebInlineMessage").mouseenter(function(e) { + e.stopPropagation(); + $(this).stop(); + var contentHeight = $(this).children('.ebInlineMessage-contentHolder').height(); + if (contentHeight > ebInlineMessageHeight) { + $(".ebInlineMessage").animate({ + height : contentHeight + 12 + }, 200); + } +}); + +$(".ebInlineMessage").mouseleave(function(e) { + e.stopPropagation(); + $(this).stop(); + $(".ebInlineMessage").animate({ + height : ebInlineMessageHeight + }, 200); +}); + +$(document).ready(function() { + $(".content").fadeIn(); +}); diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexModelHandling.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexModelHandling.js new file mode 100644 index 0000000..d6af0c9 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexModelHandling.js @@ -0,0 +1,40 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function modelHandling_analyse() { + var requestURL = restRootURL + "/Model/Analyse"; + + ajax_get(requestURL, function(data) { + resultForm_activate(document.getElementById("mainArea"), "Model Analysis Result", data.messages.message[0]); + }); +} + +function modelHandling_validate() { + var requestURL = restRootURL + "/Model/Validate"; + + ajax_getOKOrFail(requestURL, function(data) { + var validationResultString = ""; + for (var i = 1; i < data.messages.message.length; i++) { + validationResultString += (data.messages.message[i] + "\n"); + } + resultForm_activate(document.getElementById("mainArea"), "Model Validation Result", validationResultString); + }); +} \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js new file mode 100644 index 0000000..bf0e016 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js @@ -0,0 +1,227 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function newModelForm_activate(formParent) { + apexUtils_removeElement("newModelFormDiv"); + + var contentelement = document.createElement("newModelFormDiv"); + var formDiv = document.createElement("div"); + var backgroundDiv = document.createElement("div"); + backgroundDiv.setAttribute("id", "newModelDivBackground"); + backgroundDiv.setAttribute("class", "newModelDivBackground"); + + backgroundDiv.appendChild(formDiv); + contentelement.appendChild(backgroundDiv); + formParent.appendChild(contentelement); + + formDiv.setAttribute("id", "newModelFormDiv"); + formDiv.setAttribute("class", "newModelFormDiv"); + + var headingSpan = document.createElement("span"); + formDiv.appendChild(headingSpan); + + headingSpan.setAttribute("class", "headingSpan"); + headingSpan.innerHTML = "Model Details"; + + var form = document.createElement("newModelForm"); + formDiv.appendChild(form); + + form.setAttribute("id", "newModelForm"); + form.setAttribute("class", "form-style-1"); + form.setAttribute("method", "post"); + + var ul = document.createElement("ul"); + form.appendChild(ul); + + var nameLI = document.createElement("li"); + form.appendChild(nameLI); + + var nameLabel = document.createElement("label"); + nameLI.appendChild(nameLabel); + + nameLabel.setAttribute("for", "newModelFormNameInput"); + nameLabel.innerHTML = "Name: "; + + var nameLabelSpan = document.createElement("span"); + nameLabel.appendChild(nameLabelSpan); + + nameLabelSpan.setAttribute("class", "required"); + nameLabelSpan.innerHTML = "*"; + + var nameInput = document.createElement("input"); + nameLI.appendChild(nameInput); + + nameInput.setAttribute("id", "newModelFormNameInput"); + nameInput.setAttribute("type", "text"); + nameInput.setAttribute("name", "newModelFormameInput"); + nameInput.setAttribute("class", "field ebInput ebInput_width_xLong"); + nameInput.setAttribute("placeholder", "name"); + + var versionLI = document.createElement("li"); + form.appendChild(versionLI); + + var versionLabel = document.createElement("label"); + versionLI.appendChild(versionLabel); + + versionLabel.setAttribute("for", "newModelFormVersionInput"); + versionLabel.innerHTML = "Version: "; + + var versionInput = document.createElement("input"); + versionLI.appendChild(versionInput); + + versionInput.setAttribute("id", "newModelFormVersionInput"); + versionInput.setAttribute("type", "text"); + versionInput.setAttribute("name", "newModelFormVersionInput"); + versionInput.setAttribute("class", "field ebInput ebInput_width_xLong"); + versionInput.setAttribute("placeholder", "0.0.1"); + + var uuidLI = document.createElement("li"); + form.appendChild(uuidLI); + + var uuidLabel = document.createElement("label"); + uuidLI.appendChild(uuidLabel); + + uuidLabel.setAttribute("for", "newModelFormUuidInput"); + uuidLabel.innerHTML = "UUID: "; + + var uuidInput = document.createElement("input"); + uuidLI.appendChild(uuidInput); + + uuidInput.setAttribute("id", "newModelFormUuidInput"); + uuidInput.setAttribute("type", "text"); + uuidInput.setAttribute("name", "newModelFormUuidInput"); + uuidInput.setAttribute("class", "field-long ebInput ebInput_width_full"); + uuidInput.setAttribute("placeholder", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"); + + var descriptionLI = document.createElement("li"); + form.appendChild(descriptionLI); + + var descriptionLabel = document.createElement("label"); + descriptionLI.appendChild(descriptionLabel); + descriptionLabel.setAttribute("for", "newModelFormDescriptionTextArea"); + descriptionLabel.innerHTML = "Description: "; + + var descriptionTextArea = document.createElement("textarea"); + descriptionLI.appendChild(descriptionTextArea); + + descriptionTextArea.setAttribute("id", "newModelFormDescriptionTextArea"); + descriptionTextArea.setAttribute("name", "newModelFormDescriptionTextArea"); + descriptionTextArea.setAttribute("class", "field-long field-textarea ebTextArea ebTextArea_width_full"); + + var inputLI = document.createElement("li"); + form.appendChild(inputLI); + + var generateUUIDInput = document.createElement("input"); + inputLI.appendChild(generateUUIDInput); + + generateUUIDInput.setAttribute("id", "generateUUID"); + generateUUIDInput.setAttribute("class", "button ebBtn"); + generateUUIDInput.setAttribute("type", "submit"); + generateUUIDInput.setAttribute("value", "Generate UUID"); + + generateUUIDInput.onclick = newModelForm_generateUUIDPressed; + + var inputSpan0 = document.createElement("span"); + inputLI.appendChild(inputSpan0); + + inputSpan0.setAttribute("class", "required"); + inputSpan0.innerHTML = " "; + + var generateDescriptionInput = document.createElement("input"); + inputLI.appendChild(generateDescriptionInput); + + generateDescriptionInput.setAttribute("id", "generateDescription"); + generateDescriptionInput.setAttribute("class", "button ebBtn"); + generateDescriptionInput.setAttribute("type", "submit"); + generateDescriptionInput.setAttribute("value", "Generate Description"); + + generateDescriptionInput.onclick = newModelForm_generateDescriptionPressed; + + var inputSpan1 = document.createElement("span"); + inputLI.appendChild(inputSpan1); + + inputSpan1.setAttribute("class", "required"); + inputSpan1.innerHTML = " "; + + var cancelInput = document.createElement("input"); + inputLI.appendChild(cancelInput); + + cancelInput.setAttribute("id", "generateDescription"); + cancelInput.setAttribute("class", "button ebBtn"); + cancelInput.setAttribute("type", "submit"); + cancelInput.setAttribute("value", "Cancel"); + + cancelInput.onclick = newModelForm_cancelPressed; + + var inputSpan2 = document.createElement("span"); + inputLI.appendChild(inputSpan2); + + inputSpan2.setAttribute("class", "required"); + inputSpan2.innerHTML = " "; + + var submitInput = document.createElement("input"); + inputLI.appendChild(submitInput); + + submitInput.setAttribute("id", "submit"); + submitInput.setAttribute("class", "button ebBtn"); + submitInput.setAttribute("type", "submit"); + submitInput.setAttribute("value", "Submit"); + + submitInput.onclick = newModelForm_submitPressed; +} + +function newModelForm_generateUUIDPressed() { + document.getElementById("newModelFormUuidInput").value = formUtils_generateUUID(); +} + +function newModelForm_generateDescriptionPressed() { + document.getElementById("newModelFormDescriptionTextArea").value = formUtils_generateDescription(document + .getElementById("newModelFormNameInput").value, document.getElementById("newModelFormVersionInput").value, + document.getElementById("newModelFormUuidInput").value); +} + +function newModelForm_cancelPressed() { + apexUtils_removeElement("newModelDivBackground"); +} + +function newModelForm_submitPressed() { + jsonString = JSON.stringify({ + "name" : $('#newModelFormNameInput').val(), + "version" : $('#newModelFormVersionInput').val(), + "uuid" : $('#newModelFormUuidInput').val(), + "description" : $('#newModelFormDescriptionTextArea').val() + }); + + var requestURL = restRootURL + "/Model/Create"; + + ajax_post(requestURL, jsonString, function(resultData) { + apexUtils_removeElement("newModelDivBackground"); + + var requestURL = restRootURL + "/Model/GetKey"; + + ajax_get(requestURL, function(data) { + var modelKey = JSON.parse(data.messages.message[0]).apexArtifactKey; + modelFileName = modelKey.name + ".json"; + pageControl_modelMode(modelKey.name, modelKey.version, modelFileName); + }); + keyInformationTab_reset() + }); +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPageControl.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPageControl.js new file mode 100644 index 0000000..4904f30 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPageControl.js @@ -0,0 +1,253 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function pageControl_modelMode(name, version, fileName) { + $('#modelName').html(name); + $('#modelVersion').html(version); + $('#modelFileName').html(fileName ? fileName : "N/A"); + + $("#menuFileNew").addClass("disabled"); + $("#menuFileOpen").addClass("disabled"); + $("#menuFileDownload").removeClass("disabled"); + $("#menuFileClear").removeClass("disabled"); + $("#menuModelAnalyse").removeClass("disabled"); + $("#menuModelValidate").removeClass("disabled"); + $("#menuModelCompare").removeClass("disabled"); + $("#menuModelSplit").removeClass("disabled"); + $("#menuModelMerge").removeClass("disabled"); + $("#menuConceptsContextSchemas").removeClass("disabled"); + $("#menuConceptsEvents").removeClass("disabled"); + $("#menuConceptsContextAlbums").removeClass("disabled"); + $("#menuConceptsTasks").removeClass("disabled"); + $("#menuConceptsPolicies").removeClass("disabled"); + $("#menuConceptsKeyInformation").removeClass("disabled"); + + $(".modelTag").show("slide", { + direction : "left" + }, 200); + + $("#mainTabs").tabs({ + classes : { + "ui-tabs-tab" : "ui-tabs-tab-custom", + "ui-tabs-active" : "ui-tabs-active-custom", + "ui-tabs-anchor" : "ui-tabs-anchor-custom" + }, + disabled : false, + activate : function(event, ui) { + localStorage.setItem("apex_tab_index", ui.newTab.index()); + } + }); + + contextSchemaTab_activate(); + eventTab_activate(); + contextAlbumTab_activate(); + taskTab_activate(); + policyTab_activate(); + keyInformationTab_activate(); + showPlaceholder(false); +} + +function pageControl_noModelMode() { + $(".modelTag").hide("slide", { + direction : "left" + }, 200); + + $('#modelName').html("N/A"); + $('#modelVersion').html("N/A"); + $('#modelFileName').html("N/A"); + + $("#menuFileNew").removeClass("disabled"); + $("#menuFileOpen").removeClass("disabled"); + $("#menuFileDownload").addClass("disabled"); + $("#menuFileClear").addClass("disabled"); + $("#menuModelAnalyse").addClass("disabled"); + $("#menuModelValidate").addClass("disabled"); + $("#menuModelCompare").addClass("disabled"); + $("#menuModelSplit").addClass("disabled"); + $("#menuModelMerge").addClass("disabled"); + $("#menuConceptsContextSchemas").addClass("disabled"); + $("#menuConceptsEvents").addClass("disabled"); + $("#menuConceptsContextAlbums").addClass("disabled"); + $("#menuConceptsTasks").addClass("disabled"); + $("#menuConceptsPolicies").addClass("disabled"); + $("#menuConceptsKeyInformation").addClass("disabled"); + + contextSchemaTab_deactivate(); + eventTab_deactivate(); + contextAlbumTab_deactivate(); + taskTab_deactivate(); + policyTab_deactivate(); + keyInformationTab_deactivate(); + + $("#mainTabs").tabs({ + classes : { + "ui-tabs-tab" : "ui-tabs-tab-custom", + "ui-tabs-active" : "ui-tabs-active-custom", + "ui-tabs-anchor" : "ui-tabs-anchor-custom" + }, + disabled : [ 0, 1, 2, 3, 4, 5 ] + }); + showPlaceholder(true); +} + +function pageControl_busyMode() { + $("#menuFile").addClass("disabled"); + $("#menuFileNew").addClass("disabled"); + $("#menuFileOpen").addClass("disabled"); + $("#menuFileDownload").addClass("disabled"); + $("#menuFileClear").addClass("disabled"); + $("#menuModelAnalyse").addClass("disabled"); + $("#menuModelValidate").addClass("disabled"); + $("#menuModelCompare").addClass("disabled"); + $("#menuModelSplit").addClass("disabled"); + $("#menuModelMerge").addClass("disabled"); + $("#menuConceptsContextSchemas").addClass("disabled"); + $("#menuConceptsEvents").addClass("disabled"); + $("#menuConceptsContextAlbums").addClass("disabled"); + $("#menuConceptsTasks").addClass("disabled"); + $("#menuConceptsPolicies").addClass("disabled"); + $("#menuConceptsKeyInformation").addClass("disabled"); + + $("#mainTabs").tabs({ + classes : { + "ui-tabs-tab" : "ui-tabs-tab-custom", + "ui-tabs-active" : "ui-tabs-active-custom", + "ui-tabs-anchor" : "ui-tabs-anchor-custom" + }, + disabled : false + }); + + contextSchemaTab_activate(); + eventTab_activate(); + contextAlbumTab_activate(); + taskTab_activate(); + policyTab_activate(); + keyInformationTab_activate(); + showPlaceholder(false); +} + +function pageControl_readyMode() { + $("#menuFile").removeClass("disabled"); + $("#menuFileNew").removeClass("disabled"); + $("#menuFileOpen").removeClass("disabled"); + $("#menuFileDownload").removeClass("disabled"); + $("#menuFileClear").removeClass("disabled"); + $("#menuModelAnalyse").removeClass("disabled"); + $("#menuModelValidate").removeClass("disabled"); + $("#menuModelCompare").removeClass("disabled"); + $("#menuModelSplit").removeClass("disabled"); + $("#menuModelMerge").removeClass("disabled"); + $("#menuConceptsContextSchemas").removeClass("disabled"); + $("#menuConceptsEvents").removeClass("disabled"); + $("#menuConceptsContextAlbums").removeClass("disabled"); + $("#menuConceptsTasks").removeClass("disabled"); + $("#menuConceptsPolicies").removeClass("disabled"); + $("#menuConceptsKeyInformation").removeClass("disabled"); + + contextSchemaTab_deactivate(); + eventTab_deactivate(); + contextAlbumTab_deactivate(); + taskTab_deactivate(); + policyTab_deactivate(); + keyInformationTab_deactivate(); + + $("#mainTabs").tabs({ + classes : { + "ui-tabs-tab" : "ui-tabs-tab-custom", + "ui-tabs-active" : "ui-tabs-active-custom", + "ui-tabs-anchor" : "ui-tabs-anchor-custom" + }, + disabled : [ 0, 1, 2, 3, 4, 5 ] + }); + showPlaceholder(true); +} + +function pageControl_successStatus(data) { + $('#statusString').html(data.result); + $("#statusMessageTable").empty(); + + if (data.ok) { + $('#statusString').css("color", "green"); + $('#ebInlineMessage-iconHolder-icon').attr("class", "ebIcon ebIcon_big ebIcon_tick"); + } else { + $('#statusString').css("color", "red"); + $('#ebInlineMessage-iconHolder-icon').attr("class", "ebIcon ebIcon_big ebIcon_error"); + for (var i = 0; i < data.messages.message.length; i++) { + $("#statusMessageTable").append("" + data.messages.message[i] + ""); + } + // A session with session ID "0" does not exist + var sessionDoesNotExistStringStart = "A session with session ID "; + var sessionDoesNotExistStringEnd = " does not exist"; + if (data.content.indexOf(sessionDoesNotExistStringStart) !== -1 + && data.content.indexOf(sessionDoesNotExistStringEnd) !== -1) { + clearLocalStorage(); + location.reload(); + } + throw "REST call returned an error\n" + data; + } +} + +function pageControl_status(data) { + $('#statusString').html(data.result); + $("#statusMessageTable").empty(); + + if (data.ok) { + $('#statusString').css("color", "green"); + $('#ebInlineMessage-iconHolder-icon').attr("class", "ebIcon ebIcon_big ebIcon_tick"); + } else { + $('#statusString').css("color", "red"); + $('#ebInlineMessage-iconHolder-icon').attr("class", "ebIcon ebIcon_big ebIcon_error"); + } +} + +function pageControl_restError(requestURL, jqXHR, textStatus, errorThrown) { + $('#statusString').html("REST_ERROR"); + $('#statusString').css("color", "red"); + $('#ebInlineMessage-iconHolder-icon').attr("class", "ebIcon ebIcon_big ebIcon_error"); + + $("#statusMessageTable").empty(); + $("#statusMessageTable").append( + "request \"" + requestURL + "\" returned \"" + textStatus + "\" " + jqXHR.status + " \"" + + errorThrown + "\""); + +} + +function pageControl_recursiveDisable(el, disableValue, visibleValue) { + try { + el.readOnly = disableValue; + el.style.visibility = (visibleValue ? "visible" : "hidden"); + } catch (E) { + } + + if (el.childNodes && el.childNodes.length > 0) { + for (var i = 0; i < el.childNodes.length; i++) { + recursiveDisable(el.childNodes[i], disableValue, visibleValue); + } + } +} + +function showPlaceholder(show) { + if (show) { + $(".placeholder").show(); + } else { + $(".placeholder").hide(); + } +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm.js new file mode 100644 index 0000000..93c672c --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm.js @@ -0,0 +1,802 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function editPolicyForm_createPolicy(formParent) { + editPolicyForm_editPolicy_inner(formParent, null, "CREATE"); +} + +function editPolicyForm_deletePolicy(parent, name, version) { + var message = "Are you sure you want to delete Policy \"" + name + ":" + version + "\"?"; + if (apexUtils_areYouSure(message)) { + var requestURL = restRootURL + "/Policy/Delete?name=" + name + "&version=" + version; + ajax_delete(requestURL, function(data) { + apexUtils_removeElement("editPolicyFormDiv"); + policyTab_reset(); + keyInformationTab_reset() + }); + } +} + +function editPolicyForm_viewPolicy(formParent, name, version) { + // get the policy + var requestURL = restRootURL + "/Policy/Get?name=" + name + "&version=" + version; + ajax_getWithKeyInfo(requestURL, "apexPolicy", function(policy) { + editPolicyForm_editPolicy_inner(formParent, policy, "VIEW"); + }, "policyKey"); +} + +function editPolicyForm_editPolicy(formParent, name, version) { + // get the policy + var requestURL = restRootURL + "/Policy/Get?name=" + name + "&version=" + version; + ajax_getWithKeyInfo(requestURL, "apexPolicy", function(policy) { + editPolicyForm_editPolicy_inner(formParent, policy, "EDIT"); + }, "policyKey"); +} + +function editPolicyForm_editPolicy_inner(formParent, policy, viewOrEdit) { + // Get all contextSchemas too + requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var contextSchemas = new Array(); + ajax_get(requestURL, function(data2) { + for (var i = 0; i < data2.messages.message.length; i++) { + var contextSchema = JSON.parse(data2.messages.message[i]).apexContextSchema; + contextSchemas.push({ + "name" : contextSchema.key.name, + "version" : contextSchema.key.version, + "displaytext" : contextSchema.key.name + ":" + contextSchema.key.version, + "contextSchema" : contextSchema + }); + } + // Get all tasks + requestURL = restRootURL + "/Task/Get?name=&version="; + var tasks = new Array(); + ajax_get(requestURL, function(data3) { + for (var j = 0; j < data3.messages.message.length; j++) { + var task = JSON.parse(data3.messages.message[j]).apexTask; + tasks.push({ + "name" : task.key.name, + "version" : task.key.version, + "displaytext" : task.key.name + ":" + task.key.version, + "task" : task + }); + } + // Get all ContextAlbums + requestURL = restRootURL + "/ContextAlbum/Get?name=&version="; + var albums = new Array(); + ajax_get(requestURL, function(data4) { + for (var k = 0; k < data4.messages.message.length; k++) { + var album = JSON.parse(data4.messages.message[k]).apexContextAlbum; + albums.push({ + "name" : album.key.name, + "version" : album.key.version, + "displaytext" : album.key.name + ":" + album.key.version, + "album" : album + }); + } + // Get all Events + requestURL = restRootURL + "/Event/Get?name=&version="; + var events = new Array(); + ajax_get(requestURL, function(data5) { + for (var m = 0; m < data5.messages.message.length; m++) { + var event = JSON.parse(data5.messages.message[m]).apexEvent; + events.push({ + "name" : event.key.name, + "version" : event.key.version, + "displaytext" : event.key.name + ":" + event.key.version, + "event" : event + }); + } + editPolicyForm_activate(formParent, viewOrEdit, policy, tasks, events, albums, contextSchemas); + }); + }); + }); + }); +} + +function editPolicyForm_activate(parent, operation, policy, tasks, events, contextAlbums, contextItemSchemas) { + apexUtils_removeElement("editPolicyFormDiv"); + var formParent = document.getElementById(parent); + apexUtils_emptyElement(parent); + + var isedit = false; + var createEditOrView = ""; + + if (!operation) { + console.warn("No operation specified for PolicyForm form") + } else { + createEditOrView = operation.toUpperCase(); + } + + if (createEditOrView == "CREATE") { + isedit = true; + } else if (createEditOrView == "EDIT" || createEditOrView == "VIEW") { + if (createEditOrView == "EDIT") { + isedit = true; + } + + if (!policy) { + console.warn("Invalid value (\"" + policy + "\") passed as a value for \"policy\" for PolicyForm form."); + } else { + if (!policy.policyKey || !policy.policyKey.name || policy.policyKey.name == "") { + console.warn("Invalid value (\"" + policy.policyKey.name + + "\") passed as a value for \"name\" for PolicyForm form."); + } + if (!policy.policyKey || !policy.policyKey.version || policy.policyKey.version == "") { + console.warn("Invalid value (\"" + policy.policyKey.version + + "\") passed as a value for \"version\" for PolicyForm form."); + } + if (!policy.uuid || policy.uuid == "") { + console.warn("Invalid value (\"" + policy.uuid + + "\") passed as a value for \"uuid\" for PolicyForm form."); + } + } + } else { + console.warn("Invalid operation (\"" + operation + + "\") specified for PolicyForm form. Only \"Create\", \"Edit\" and \"View\" operations are supported"); + } + + var contentelement = document.createElement("editPolicyFormDiv"); + var formDiv = document.createElement("div"); + contentelement.appendChild(formDiv); + formDiv.setAttribute("id", "editPolicyFormDiv"); + formDiv.setAttribute("class", "editPolicyFormDiv"); + + var headingSpan = document.createElement("h2"); + formDiv.appendChild(headingSpan); + headingSpan.innerHTML = "Policy Editor"; + + var form = document.createElement("editPolicyForm"); + formDiv.appendChild(form); + + form.setAttribute("id", "editPolicyForm"); + form.setAttribute("class", "form-style-1"); + form.setAttribute("method", "post"); + form.setAttribute("createEditOrView", createEditOrView); + + var formul = document.createElement("ul"); + form.appendChild(formul); + + // name + var nameLI = document.createElement("li"); + formul.appendChild(nameLI); + var nameLabel = document.createElement("label"); + nameLI.appendChild(nameLabel); + nameLabel.setAttribute("for", "editPolicyFormNameInput"); + nameLabel.innerHTML = "Name: "; + var nameLabelSpan = document.createElement("span"); + nameLabel.appendChild(nameLabelSpan); + nameLabelSpan.setAttribute("class", "required"); + nameLabelSpan.innerHTML = "*"; + var nameInput = document.createElement("input"); + nameLI.appendChild(nameInput); + nameInput.setAttribute("id", "editPolicyFormNameInput"); + nameInput.setAttribute("type", "text"); + nameInput.setAttribute("name", "editPolicyFormNameInput"); + nameInput.setAttribute("class", "field ebInput"); + nameInput.setAttribute("placeholder", "name"); + if (policy != null && policy.policyKey != null && policy.policyKey.name != null) { + nameInput.value = policy.policyKey.name; + } + if (createEditOrView != "CREATE") { + nameInput.readOnly = true; + } + + // version + var versionLI = document.createElement("li"); + formul.appendChild(versionLI); + var versionLabel = document.createElement("label"); + versionLI.appendChild(versionLabel); + versionLabel.setAttribute("for", "editPolicyFormVersionInput"); + versionLabel.innerHTML = "Version: "; + var versionInput = document.createElement("input"); + versionLI.appendChild(versionInput); + versionInput.setAttribute("id", "editPolicyFormVersionInput"); + versionInput.setAttribute("type", "text"); + versionInput.setAttribute("name", "editPolicyFormVersionInput"); + versionInput.setAttribute("class", "field ebInput"); + versionInput.setAttribute("placeholder", "0.0.1"); + if (policy != null && policy.policyKey != null && policy.policyKey.version != null) { + versionInput.value = policy.policyKey.version; + } + if (createEditOrView != "CREATE") { + versionInput.readOnly = true; + } + + // uuid + var uuidLI = document.createElement("li"); + formul.appendChild(uuidLI); + var uuidLabel = document.createElement("label"); + uuidLI.appendChild(uuidLabel); + uuidLabel.setAttribute("for", "editPolicyFormUuidInput"); + uuidLabel.innerHTML = "UUID: "; + var uuidInput = document.createElement("input"); + uuidLI.appendChild(uuidInput); + uuidInput.setAttribute("id", "editPolicyFormUuidInput"); + uuidInput.setAttribute("type", "text"); + uuidInput.setAttribute("name", "editPolicyFormUuidInput"); + uuidInput.setAttribute("class", "field-long ebInput ebInput_width_full"); + uuidInput.setAttribute("placeholder", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"); + if (policy != null && policy.uuid != null) { + uuidInput.value = policy.uuid; + } + if (createEditOrView != "CREATE") { + uuidInput.readOnly = true; + } + + var edit_disabled = (createEditOrView != "CREATE" && createEditOrView != "EDIT"); + + // description + var descriptionLI = document.createElement("li"); + formul.appendChild(descriptionLI); + var descriptionLabel = document.createElement("label"); + descriptionLI.appendChild(descriptionLabel); + descriptionLabel.setAttribute("for", "editPolicyFormDescriptionTextArea"); + descriptionLabel.innerHTML = "Description: "; + var descriptionTextArea = document.createElement("textarea"); + descriptionLI.appendChild(descriptionTextArea); + descriptionTextArea.setAttribute("id", "editPolicyFormDescriptionTextArea"); + descriptionTextArea.setAttribute("name", "editPolicyFormDescriptionTextArea"); + descriptionTextArea.setAttribute("class", "field-long ebTextArea ebTextArea_width_full"); + if (policy != null && policy.description != null) { + descriptionTextArea.value = policy.description; + } + descriptionTextArea.readOnly = edit_disabled; + + // template type + var templateTypeLI = document.createElement("li"); + formul.appendChild(templateTypeLI); + var templateTypeLabel = document.createElement("label"); + templateTypeLI.appendChild(templateTypeLabel); + templateTypeLabel.setAttribute("for", "editEventFormTemplateTypeInput"); + templateTypeLabel.innerHTML = "Policy Type / Flavour: "; + var templateTypeInput = document.createElement("input"); + templateTypeLI.appendChild(templateTypeInput); + templateTypeInput.setAttribute("id", "editEventFormTemplateTypeInput"); + templateTypeInput.setAttribute("type", "text"); + templateTypeInput.setAttribute("name", "editEventFormTemplateTypeInput"); + templateTypeInput.setAttribute("class", "field-policyTemplateType ebInput"); + templateTypeInput.setAttribute("placeholder", "FREEFORM"); + if (policy != null && policy.template != null) { + templateTypeInput.value = policy.template; + } else { + templateTypeInput.value = "FREEFORM"; + } + if (createEditOrView != "CREATE" && createEditOrView != "EDIT") { + templateTypeInput.readOnly = true; + } + + // first state + var firstStateLI = document.createElement("li"); + formul.appendChild(firstStateLI); + var firstStateLabel = document.createElement("label"); + firstStateLI.appendChild(firstStateLabel); + firstStateLabel.setAttribute("for", "editEventFormSelectFirstState_dropdownList"); + firstStateLabel.innerHTML = "First State: "; + var firststateoptions = new Array(); + var firststateselected = null; + if (policy != null && policy.state != null) { + for (i = 0; i < policy.state.entry.length; i++) { + if (policy.state.entry[i] != null && policy.state.entry[i].key != null) { + var statename = policy.state.entry[i].key; + firststateoptions.push({ + "name" : statename, + "displaytext" : statename + }); + } + } + } + if (policy != null && policy.firstState != null && policy.firstState != "") { + firststateselected = { + "name" : policy.firstState, + "displaytext" : policy.firstState + } + } + var firstStateSelectDiv = dropdownList("editEventFormSelectFirstState", firststateoptions, firststateselected, + (createEditOrView != "CREATE" && createEditOrView != "EDIT"), function() { + return editPolicyForm_updateTriggerEventOptions(events); + }, function() { + return editPolicyForm_getStateOptions(); + }); + firstStateLI.appendChild(firstStateSelectDiv); + + // Trigger event + var triggerLI = document.createElement("li"); + formul.appendChild(triggerLI); + var triggerLabel = document.createElement("label"); + triggerLI.appendChild(triggerLabel); + triggerLabel.setAttribute("for", "editEventFormSelectTrigger_dropdownList"); + triggerLabel.innerHTML = "Policy Trigger Event: "; + var triggerevent = null; + if (policy != null && policy.firstState != null && policy.firstState != "" && policy.state != null) { + for (i = 0; i < policy.state.entry.length; i++) { + if (policy.state.entry[i] != null && policy.state.entry[i].key != null) { + var statename = policy.state.entry[i].key; + var state = policy.state.entry[i].value; + if (statename != null && statename == policy.firstState) { + triggerevent = { + "name" : state.trigger.name, + "version" : state.trigger.version, + "displaytext" : state.trigger.name + ":" + state.trigger.version + }; + } + } + } + } + // var triggerSelectDiv = dropdownList("editEventFormSelectTrigger", events, + // triggerevent, true, null); // ewatkmi: replaced dropdown with label + var triggerSelectDiv = document.createElement("label"); + triggerSelectDiv.setAttribute("class", "policy-trigger-event"); + triggerSelectDiv.setAttribute("id", "editEventFormSelectTrigger_dropdownList"); + triggerSelectDiv.innerHTML = triggerevent ? triggerevent.displaytext : "No Event Selected"; + triggerLI.appendChild(triggerSelectDiv); + var triggerPeriodicEventCheckbox = document.createElement("input"); + triggerPeriodicEventCheckbox.setAttribute("type", "checkbox"); + triggerPeriodicEventCheckbox.setAttribute("id", "periodicEventsCheckbox"); + triggerPeriodicEventCheckbox.setAttribute("class", "field-checkbox-center periodic-events-checkbox"); + triggerPeriodicEventCheckbox.disabled = createEditOrView != "EDIT"; + triggerPeriodicEventCheckbox.onclick = function() { + var firstState = document.getElementById("editEventFormSelectFirstState_dropdownList_display").innerHTML; + var firstStateDropdown = document.getElementById("editPolicyFormTrigger_" + firstState + "_dropdownList"); + if ($(triggerPeriodicEventCheckbox).is(":checked")) { + var periodicEvent = undefined; + var tmpEvents = $.merge([], events); + for ( var e in events) { + if (events[e].name.indexOf("PeriodicEvent") !== -1) { + periodicEvent = events[e]; + break; + } + } + if (!periodicEvent) { + periodicEvent = { + name : "PeriodicEvent", + version : "0.0.1", + displaytext : "PeriodicEvent:0.0.1", + event : { + description : "", + key : { + name : "PeriodicEvent", + version : "0.0.1" + }, + nameSpace : "org.onap.policy.apex.domains.aadm.events", + parameter : { + entry : [ { + key : "PERIODIC_EVENT_COUNT", + value : { + key : "PERIODIC_EVENT_COUNT", + optional : false, + fieldSchemaKey : { + name : "PeriodicEventCount", + version : "0.0.1" + } + } + } ] + }, + source : "System", + target : "Apex", + uuid : "44236da1-3d47-4988-8033-b6fee9d6a0f4" + }, + }; + tmpEvents.push(periodicEvent); + } + + dropdownList_ChangeOptions(firstStateDropdown, tmpEvents, periodicEvent, false); + editPolicyForm_updateTriggerEventOptions(tmpEvents); + } else { + dropdownList_ChangeOptions(firstStateDropdown, events, events[0], false); + editPolicyForm_updateTriggerEventOptions(events); + } + } + + triggerLI.appendChild(triggerPeriodicEventCheckbox); + + triggerPeriodicEventLabel = document.createElement("label"); + triggerPeriodicEventLabel.setAttribute("class", "periodic-events-label"); + triggerPeriodicEventLabel.innerHTML = "is Periodic Event"; + triggerLI.appendChild(triggerPeriodicEventLabel); + + // states + var statesLI = document.createElement("li"); + formul.appendChild(statesLI); + var statesLabel = document.createElement("label"); + statesLI.appendChild(statesLabel); + statesLabel.setAttribute("for", "editEventFormStates"); + statesLabel.innerHTML = "States: "; + var statesUL = document.createElement("ul"); + statesUL.setAttribute("id", "editEventFormStates"); + statesLI.appendChild(statesUL); + if (policy && policy.state) { + var states = policy.state.entry; + for ( var s in states) { + var state = states[s]; + if (state.key == policy.firstState) { + states.splice(s, 1); + states.unshift(state); + break; + } + } + for (i = 0; i < policy.state.entry.length; i++) { + stateEntry = policy.state.entry[i]; + var statename = stateEntry.key; + var state = stateEntry.value; + var stateLI = editPolicyForm_addState(statename, state, createEditOrView, policy, tasks, events, + contextAlbums, contextItemSchemas); + statesUL.appendChild(stateLI); + } + } + + // add new state + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var newStateLI = document.createElement("li"); + statesUL.appendChild(newStateLI); + var newStateLabel = document.createElement("label"); + newStateLI.appendChild(newStateLabel); + newStateLabel.setAttribute("for", "editPolicyFormStateDiv_"); + newStateLabel.innerHTML = "Add a new State: "; + var newStDiv = document.createElement("div"); + newStateLI.appendChild(newStDiv); + newStDiv.setAttribute("id", "editPolicyFormStateDiv_"); + newStDiv.setAttribute("class", "editPolicyFormStateDiv"); + var newStateInput = document.createElement("input"); + newStDiv.appendChild(newStateInput); + newStateInput.setAttribute("id", "editEventFormNewStateInput"); + newStateInput.setAttribute("type", "text"); + newStateInput.setAttribute("name", "editEventFormTemplateTypeInput"); + newStateInput.setAttribute("class", "field-policyTemplateType ebInput ebInput_width_xLong"); + newStateInput.setAttribute("placeholder", "Name for new State ... "); + var addState = document.createElement("button"); + newStDiv.appendChild(addState); + addState.setAttribute("id", "addStateButton"); + addState.setAttribute("class", "ebBtn"); + addState.setAttribute("type", "submit"); + addState.setAttribute("value", "Add a new State"); + addState.style["margin-left"] = "10px"; + addState.onclick = function() { + return editPolicyForm_addNewState(statesUL, createEditOrView, policy, tasks, events, contextAlbums, + contextItemSchemas); + }; + addState.innerHTML = addState.getAttribute("value"); + } + + // buttons + var inputLI = document.createElement("li"); + formul.appendChild(inputLI); + if (createEditOrView == "CREATE") { + var generateUUIDInput = document.createElement("button"); + inputLI.appendChild(generateUUIDInput); + generateUUIDInput.setAttribute("id", "generateUUID"); + generateUUIDInput.setAttribute("class", "ebBtn ebBtn_large"); + generateUUIDInput.setAttribute("type", "submit"); + generateUUIDInput.setAttribute("value", "Generate UUID"); + generateUUIDInput.onclick = editPolicyForm_generateUUIDPressed; + generateUUIDInput.innerHTML = generateUUIDInput.getAttribute("value"); + + var inputSpan0 = document.createElement("span"); + inputLI.appendChild(inputSpan0); + inputSpan0.setAttribute("class", "required"); + inputSpan0.innerHTML = " "; + + var generateDescriptionInput = document.createElement("button"); + inputLI.appendChild(generateDescriptionInput); + generateDescriptionInput.setAttribute("id", "generateDescription"); + generateDescriptionInput.setAttribute("class", "ebBtn ebBtn_large"); + generateDescriptionInput.setAttribute("type", "submit"); + generateDescriptionInput.setAttribute("value", "Generate Description"); + generateDescriptionInput.onclick = editPolicyForm_generateDescriptionPressed; + generateDescriptionInput.innerHTML = generateDescriptionInput.getAttribute("value"); + + var inputSpan1 = document.createElement("span"); + inputLI.appendChild(inputSpan1); + inputSpan1.setAttribute("class", "required"); + inputSpan1.innerHTML = " "; + } + + var cancelInput = document.createElement("button"); + inputLI.appendChild(cancelInput); + cancelInput.setAttribute("id", "cancel"); + cancelInput.setAttribute("class", "ebBtn ebBtn_large"); + cancelInput.setAttribute("type", "submit"); + cancelInput.setAttribute("value", "Cancel"); + cancelInput.onclick = editPolicyForm_cancelPressed; + cancelInput.innerHTML = cancelInput.getAttribute("value"); + + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var inputSpan2 = document.createElement("span"); + inputLI.appendChild(inputSpan2); + inputSpan2.setAttribute("class", "required"); + inputSpan2.innerHTML = " "; + var submitInput = document.createElement("button"); + inputLI.appendChild(submitInput); + submitInput.setAttribute("id", "submit"); + submitInput.setAttribute("class", "ebBtn ebBtn_large"); + submitInput.setAttribute("type", "submit"); + submitInput.setAttribute("value", "Submit"); + submitInput.onclick = editPolicyForm_submitPressed; + submitInput.innerHTML = submitInput.getAttribute("value"); + } + + formParent.appendChild(contentelement); + scrollToTop(); +} + +function editPolicyForm_addNewState(statesUL, createEditOrView, policy, tasks, events, contextAlbums, + contextItemSchemas) { + var statename = document.getElementById("editEventFormNewStateInput").value; + if (statename == null || statename == "") { + alert("Please enter a value for the name of the new state\"" + paramname + "\""); + document.getElementById("editEventFormNewStateInput").focus(); + return false; + } else if (statename.toUpperCase() == "NULL" || statename.toUpperCase() == "NONE") { + alert("Please enter a valid value for the name of the new state\"" + paramname + + "\". Values \"NULL\" and \"None\" are not allowed"); + document.getElementById("editEventFormNewStateInput").focus(); + return false; + } else { + document.getElementById("editEventFormNewStateInput").value = ""; + } + if (policy && policy.state) { + for (i = 0; i < policy.state.entry.length; i++) { + if (statename.toUpperCase() == policy.state.entry[i].key.toUpperCase()) { + alert("Policy " + policy.policyKey.name + ":" + policy.policyKey.version + + " already contains a state called \"" + statename + "\"."); + document.getElementById("editEventFormNewStateInput").focus(); + return false; + } + } + } + var stateLI = editPolicyForm_addState(statename, null, createEditOrView, policy, tasks, events, contextAlbums, + contextItemSchemas); + statesUL.insertBefore(stateLI, statesUL.lastElementChild); + editPolicyForm_updateTriggerEventOptions(events); +} + +function editPolicyForm_getStateOptions() { + var stateoptions = new Array(); + var stateslis = document.getElementById("editEventFormStates").querySelectorAll( + "#editEventFormStates > li[stateName]"); // get li direct child + // elements with an + // attribute "stateName" + for (var i = 0; i < stateslis.length; i++) { + if (stateslis != null && stateslis[i] != null && stateslis[i].getAttribute("stateName") != null) { + stateoptions.push({ + "name" : stateslis[i].getAttribute("stateName"), + "displaytext" : stateslis[i].getAttribute("stateName") + }); + } + } + return stateoptions; +} + +function editPolicyForm_getNextStateOptions() { + var stateoptions = editPolicyForm_getStateOptions(); + stateoptions.push({ + "name" : "NULL", + "displaytext" : "None" + }); + return stateoptions; +} + +function editPolicyForm_updateTriggerEventOptions(events) { + var stateevent = null; + var triggerSelectDiv = document.getElementById("editEventFormSelectTrigger_dropdownList"); + var firstStateSelectDiv = document.getElementById("editEventFormSelectFirstState_dropdownList"); + var firststate = firstStateSelectDiv.selectedOption; + var createEditOrView = document.getElementById("editPolicyForm").getAttribute("createEditOrView"); + if (firststate != null && firststate.name != null) { + var statename = firststate.name; + var stateeventselect = document.getElementById("editPolicyFormTrigger_" + statename + "_dropdownList"); + if (stateeventselect != null && stateeventselect.selectedOption) { + stateevent = stateeventselect.selectedOption; + } + if (createEditOrView == "CREATE") { + var periodicCheckbox = document.getElementById("periodicEventsCheckbox"); + if (periodicCheckbox.hasAttribute("disabled")) { + periodicCheckbox.removeAttribute("disabled"); + } + } + } else { + var triggerSelectDiv = document.getElementById("editEventFormSelectTrigger_dropdownList"); + triggerSelectDiv.innerHTML = "No Event Selected"; + var periodicEventsCheckbox = $("#periodicEventsCheckbox"); + if (periodicEventsCheckbox.is(":checked")) { + periodicEventsCheckbox.attr("checked", false); + } + if (createEditOrView == "CREATE") { + var periodicCheckbox = document.getElementById("periodicEventsCheckbox"); + if (!periodicCheckbox.hasAttribute("disabled")) { + periodicCheckbox.disabled = true; + } + } + } + if (stateevent) { + triggerSelectDiv.innerHTML = stateevent.displaytext; + if (stateevent.displaytext.indexOf("PeriodicEvent") == -1) { + var periodicEventsCheckbox = $("#periodicEventsCheckbox"); + if (periodicEventsCheckbox.is(":checked")) { + periodicEventsCheckbox.attr("checked", false); + } + } + } +} + +function editPolicyForm_addState(statename, state, createEditOrView, policy, tasks, events, contextAlbums, + contextItemSchemas) { + var stateLI = document.createElement("li"); + stateLI.setAttribute("stateName", statename); + var deleteDiv = document.createElement("div"); + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete"); + deleteDiv.onclick = function(event) { + $(stateLI) + .hide( + "fast", + function() { + stateLI.parentNode.removeChild(stateLI); + var firstState = document + .getElementById("editEventFormSelectFirstState_dropdownList_display").innerHTML; + var selected = (statename !== firstState) ? { + name : firstState, + displaytext : firstState + } : undefined; + dropdownList_ChangeOptions(document + .getElementById("editEventFormSelectFirstState_dropdownList"), + editPolicyForm_getStateOptions(), selected, false, + editPolicyForm_getStateOptions); + editPolicyForm_updateTriggerEventOptions(); + }); + } + } else { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete ebIcon_disabled"); + } + deleteDiv.style["vertical-align"] = "baseline"; + stateLI.appendChild(deleteDiv); + var stateLabel = document.createElement("label"); + stateLabel.style.display = "inline-block"; + stateLabel.style["min-width"] = "120px"; + stateLabel.style["padding-left"] = "10px"; + stateLabel.style["vertical-align"] = "middle"; + stateLabel.innerHTML = statename; + stateLI.appendChild(stateLabel); + var stateDiv = editPolicyForm_State_generateStateDiv(createEditOrView, policy, statename, state, tasks, events, + contextAlbums, contextItemSchemas); + var showhideDIV = showHideElement("editEventFormStates_" + statename, stateDiv, true, "Show " + statename + " ...", + "Hide " + statename + " ...", "showhide_div_show", "showhide_div_hide", "showhide_button_show", + "showhide_button_hide"); + showhideDIV.style.display = "inline-block"; + showhideDIV.style["vertical-align"] = "middle"; + stateLabel.setAttribute("for", stateDiv.id); + stateLI.appendChild(showhideDIV); + stateLI.appendChild(stateDiv); + return stateLI; +} + +function editPolicyForm_generateUUIDPressed() { + document.getElementById("editPolicyFormUuidInput").value = formUtils_generateUUID(); +} + +function editPolicyForm_generateDescriptionPressed() { + document.getElementById("editPolicyFormDescriptionTextArea").value = formUtils_generateDescription(document + .getElementById("editPolicyFormNameInput").value, + document.getElementById("editPolicyFormVersionInput").value, document + .getElementById("editPolicyFormUuidInput").value); +} + +function editPolicyForm_cancelPressed() { + apexUtils_removeElement("editPolicyFormDiv"); + policyTab_reset(); +} + +function editPolicyForm_submitPressed() { + var createEditOrView = document.getElementById("editPolicyForm").getAttribute("createEditOrView"); + if (!createEditOrView || createEditOrView == "" || (createEditOrView != "CREATE" && createEditOrView != "EDIT")) { + console.error("Invalid operation \"" + createEditOrView + + "\" passed to editPolicyForm_submitPressed function. Edit failed"); + apexUtils_removeElement("editPolicyFormDiv"); + policyTab_reset(); + return; + } + + var policybean = editPolicyForm_getPolicyBean(); + if (policybean == null) { + return false; + } + var jsonString = JSON.stringify(policybean); + + if (createEditOrView == "CREATE") { + var requestURL = restRootURL + "/Policy/Create"; + ajax_post(requestURL, jsonString, function(resultData) { + apexUtils_removeElement("editPolicyFormDiv"); + policyTab_reset(); + keyInformationTab_reset(); + }); + } else if (createEditOrView == "EDIT") { + var firstStatePeriodic = $("#periodicEventsCheckbox").is(":checked") + var requestURL = restRootURL + "/Policy/Update?firstStatePeriodic=" + firstStatePeriodic; + ajax_put(requestURL, jsonString, function(resultData) { + apexUtils_removeElement("editPolicyFormDiv"); + policyTab_reset(); + keyInformationTab_reset(); + }); + } + +} + +function editPolicyForm_getPolicyBean() { + + var name = document.getElementById('editPolicyFormNameInput').value; + if (name == null || name == "") { + console.error("No Name is specified for the policy"); + alert("No Name is specified for the policy"); + return null; + } + var version = document.getElementById('editPolicyFormVersionInput').value; + if (version == null || version == "") { + console.error("No Version is specified for the policy"); + alert("No Version is specified for the policy"); + return null; + } + var uuid = document.getElementById('editPolicyFormUuidInput').value; + if (uuid == null || uuid == "") { + console.error("No UUID is specified for the policy"); + alert("No UUID is specified for the policy"); + return null; + } + var desc = document.getElementById('editPolicyFormDescriptionTextArea').value; + if (desc == null) { + desc = ""; + } + var template = document.getElementById('editEventFormTemplateTypeInput').value; + if (template == null) { + template = ""; + } + var firststateselectedoption = document.getElementById("editEventFormSelectFirstState" + "_dropdownList").selectedOption; + if (firststateselectedoption == null) { + console.error("Please select an option for First State"); + alert("Please select an option for First State"); + return null; + } + var states = new Object(); + var stateslis = document.getElementById("editEventFormStates").querySelectorAll( + "#editEventFormStates > li[stateName]"); // get li direct child + // elements with an + // attribute "stateName" + for (var i = 0; i < stateslis.length; i++) { // ignore last li ... it has + // the new state button etc. + if (stateslis != null && stateslis[i] != null && stateslis[i].getAttribute("stateName") != null) { + var statename = stateslis[i].getAttribute("stateName"); + var state = editPolicyForm_State_getStateBean(statename); + if (state == null) { + return null; + } + states[statename] = state; + } + } + + var policybean = { + "name" : name, + "version" : version, + "uuid" : uuid, + "description" : desc, + "template" : template, + "firstState" : firststateselectedoption.name, + "states" : states + }; + return policybean; +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm_State.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm_State.js new file mode 100644 index 0000000..77e8814 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm_State.js @@ -0,0 +1,1129 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function editPolicyForm_State_generateStateDiv(createEditOrView, policy, statename, state, tasks, events, + contextAlbums, contextItemSchemas) { + var retDiv = document.createElement("div"); + retDiv.setAttribute("id", "editPolicyFormStateDiv_" + statename); + retDiv.setAttribute("class", "editPolicyFormStateDiv"); + var divUL = document.createElement("ul"); + retDiv.appendChild(divUL); + + // input event + var triggerLI = document.createElement("li"); + divUL.appendChild(triggerLI); + var triggerLabel = document.createElement("label"); + triggerLI.appendChild(triggerLabel); + triggerLabel.setAttribute("for", "editPolicyFormTrigger" + "_" + statename); + triggerLabel.innerHTML = "Input Event for State: "; + var eventselected = null; + if (state != null && state.trigger != null) { + eventselected = { + "name" : state.trigger.name, + "version" : state.trigger.version, + "displaytext" : state.trigger.name + ":" + state.trigger.version + }; + } + var ineventSelectDiv = dropdownList("editPolicyFormTrigger" + "_" + statename, events, eventselected, + (createEditOrView == "VIEW"), function() { + return editPolicyForm_updateTriggerEventOptions(events) + }); + triggerLI.appendChild(ineventSelectDiv); + + // Context Albums references + var contextsLI = document.createElement("li"); + divUL.appendChild(contextsLI); + var contextsLabel = document.createElement("label"); + contextsLI.appendChild(contextsLabel); + contextsLabel.setAttribute("for", "editPolicyFormContextsTable" + "_" + statename); + contextsLabel.innerHTML = "Context Albums used in Task Selection Logic / State Output Logic: "; + var contextstable = document.createElement("table"); + contextstable.setAttribute("id", "editPolicyFormContextsTable" + "_" + statename); + contextstable.setAttribute("name", "editPolicyFormContextsTable" + "_" + statename); + contextstable.setAttribute("class", "table-policycontext"); + contextsLI.appendChild(contextstable); + // var contextstable_head = document.createElement("thead"); + // contextstable.appendChild(contextstable_head); + // var contextstable_head_tr = document.createElement("tr"); + // contextstable_head.appendChild(contextstable_head_tr); + // contextstable_head_tr.appendChild(document.createElement("th")); //empty, + // for delete button + // var contextstable_head_th = document.createElement("th"); + // contextstable_head_tr.appendChild(contextstable_head_th); + // contextstable_head_th.innerHTML = "Context Album: "; + // contextstable_head_th.setAttribute("class", + // "table-policycontext-heading"); + var contextstable_body = document.createElement("tbody"); + contextstable.appendChild(contextstable_body); + // Add the contexts + if (state && state.contextAlbumReference && $.isArray(state.contextAlbumReference)) { + for (var p = 0; p < state.contextAlbumReference.length; p++) { + var contextEntry = state.contextAlbumReference[p]; + var contextName = contextEntry.name + ":" + contextEntry.version; + var ce = { + "name" : contextEntry.name, + "version" : contextEntry.version, + "displaytext" : contextName + }; + editPolicyForm_State_addPolicyContext(contextstable_body, (createEditOrView == "VIEW"), statename, + contextName, ce, contextAlbums); + } + } + // add the Policy Context button + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var contextTR = document.createElement("tr"); + contextTR.setAttribute("class", "field-policycontext-tr.new"); + contextstable_body.appendChild(contextTR); + + var contextTD = document.createElement("td"); + contextTD.setAttribute("colspan", "2"); + contextTR.appendChild(contextTD); + var addContextInput = createAddFormButton("Add New Policy Logic Context"); + contextTD.appendChild(addContextInput); + // addContextInput.setAttribute("id", "addContextButton"); + // addContextInput.setAttribute("class", "ebBtn ebBtn_large"); + // addContextInput.setAttribute("type", "submit"); + // addContextInput.setAttribute("value", "Add New Policy Logic + // Context"); + // addContextInput.innerHTML = addContextInput.getAttribute("value"); + addContextInput.onclick = function() { + return editPolicyForm_State_addPolicyContext(contextstable_body, false, statename, null, null, + contextAlbums); + }; + } + + // Task references + var tasksLI = document.createElement("li"); + divUL.appendChild(tasksLI); + var tasksLabel = document.createElement("label"); + tasksLI.appendChild(tasksLabel); + tasksLabel.setAttribute("for", "editPolicyFormTasksTable" + "_" + statename); + tasksLabel.innerHTML = "State Tasks:"; + var taskstable = document.createElement("table"); + taskstable.setAttribute("id", "editPolicyFormTasksTable" + "_" + statename); + taskstable.setAttribute("name", "editPolicyFormTasksTable" + "_" + statename); + taskstable.setAttribute("class", "table-policytask"); + tasksLI.appendChild(taskstable); + var taskstable_head = document.createElement("thead"); + taskstable.appendChild(taskstable_head); + var taskstable_head_tr = document.createElement("tr"); + taskstable_head.appendChild(taskstable_head_tr); + taskstable_head_tr.appendChild(document.createElement("th")); // empty, + // for + // delete + // button + var taskstable_isdefault_head_th = document.createElement("th"); + taskstable_head_tr.appendChild(taskstable_isdefault_head_th); + taskstable_isdefault_head_th.innerHTML = "Default Task? "; + taskstable_isdefault_head_th.setAttribute("class", "table-policytask-heading form-heading"); + var taskstable_localname_head_th = document.createElement("th"); + taskstable_head_tr.appendChild(taskstable_localname_head_th); + taskstable_localname_head_th.innerHTML = "Local Name for Task: "; + taskstable_localname_head_th.setAttribute("class", "table-policytask-heading form-heading"); + var taskstable_head_th = document.createElement("th"); + taskstable_head_tr.appendChild(taskstable_head_th); + taskstable_head_th.innerHTML = "Task: "; + taskstable_head_th.setAttribute("class", "table-policytask-heading form-heading"); + var taskstable_outputtype_head_th = document.createElement("th"); + taskstable_head_tr.appendChild(taskstable_outputtype_head_th); + taskstable_outputtype_head_th.innerHTML = "Output Mapping type: "; + taskstable_outputtype_head_th.setAttribute("class", "table-policytask-heading form-heading"); + taskstable_outputtype_head_th.setAttribute("colspan", "2"); + var taskstable_outputsel_head_th = document.createElement("th"); + taskstable_head_tr.appendChild(taskstable_outputsel_head_th); + taskstable_outputsel_head_th.innerHTML = "Output Mapping: "; + taskstable_outputsel_head_th.setAttribute("class", "table-policytask-heading form-heading"); + var taskstable_body = document.createElement("tbody"); + taskstable.appendChild(taskstable_body); + var defaulttask = null; + if (state && state.defaultTask && state.defaultTask.name && state.defaultTask.version) { + defaulttask = state.defaultTask.name + ":" + state.defaultTask.version; + } + // Add the tasks + if (state && state.taskReferences && $.isArray(state.taskReferences.entry)) { + for (var p = 0; p < state.taskReferences.entry.length; p++) { + var taskEntry = state.taskReferences.entry[p]; + var taskName = taskEntry.key.name + ":" + taskEntry.key.version; + var taskselected = { + "name" : taskEntry.key.name, + "version" : taskEntry.key.version, + "displaytext" : taskName + }; + var taskreference = taskEntry.value; + editPolicyForm_State_addPolicyTask(taskstable_body, (createEditOrView == "VIEW"), + (defaulttask == taskName), state, statename, taskreference, taskselected, tasks); + } + } + // add the Policy Task button + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var taskTR = document.createElement("tr"); + taskTR.setAttribute("class", "field-policytask-tr.new"); + taskstable_body.appendChild(taskTR); + var taskTD = document.createElement("td"); + taskTD.setAttribute("colspan", "4"); + taskTR.appendChild(taskTD); + var addTaskInput = createAddFormButton("Add New Task"); + taskTD.appendChild(addTaskInput); + // addTaskInput.setAttribute("id", "addTaskButton"); + // addTaskInput.setAttribute("class", "ebBtn ebBtn_large"); + // addTaskInput.setAttribute("type", "submit"); + // addTaskInput.setAttribute("value", "Add New Task"); + // addTaskInput.innerHTML = addTaskInput.getAttribute("value"); + addTaskInput.onclick = function() { + return editPolicyForm_State_addPolicyTask(taskstable_body, false, false, state, statename, null, null, + tasks); + }; + } + + // tasksellogic + var tasksellogicLI = document.createElement("li"); + divUL.appendChild(tasksellogicLI); + var tasksellogicLabel = document.createElement("label"); + tasksellogicLI.appendChild(tasksellogicLabel); + tasksellogicLabel.setAttribute("for", "editEventFormTaskSelLogicDiv" + "_" + statename); + tasksellogicLabel.innerHTML = "Task Selection Logic: "; + var tasksellogicdiv = document.createElement("div"); + tasksellogicdiv.setAttribute("id", "editEventFormTaskSelLogicDiv" + "_" + statename); + + var logic = ""; + if (state && state.taskSelectionLogic && state.taskSelectionLogic.logic && state.taskSelectionLogic.logic != "") { + logic = state.taskSelectionLogic.logic; + } + var edit_disabled = false; + if (createEditOrView != "CREATE" && createEditOrView != "EDIT") { + edit_disabled = true; + } + var textarea = showHideTextarea("editEventFormTaskSelLogicInput" + "_" + statename, logic, false, !edit_disabled, + false); + + tasksellogicLI.appendChild(textarea); + + // tasksellogic type + var tasksellogicTypeLabel = document.createElement("label"); + tasksellogicdiv.appendChild(tasksellogicTypeLabel); + tasksellogicTypeLabel.setAttribute("for", "editPolicyFormTaskSelLogicTypeInput" + "_" + statename); + tasksellogicTypeLabel.innerHTML = "Task Selection Logic Type / Flavour: "; + var tasksellogicTypeInput = document.createElement("input"); + tasksellogicdiv.appendChild(tasksellogicTypeInput); + tasksellogicTypeInput.setAttribute("id", "editPolicyFormTaskSelLogicTypeInput" + "_" + statename); + tasksellogicTypeInput.setAttribute("type", "text"); + tasksellogicTypeInput.setAttribute("name", "editPolicyFormTaskSelLogicTypeInput" + "_" + statename); + tasksellogicTypeInput.setAttribute("class", "field-taskSelLogicType ebInput ebInput_width_xLong"); + tasksellogicTypeInput.setAttribute("placeholder", "MVEL"); + if (state && state.taskSelectionLogic && state.taskSelectionLogic.logicFlavour != null + && state.taskSelectionLogic.logicFlavour != "" + && state.taskSelectionLogic.logicFlavour.toUpperCase() != "UNDEFINED") { + tasksellogicTypeInput.value = state.taskSelectionLogic.logicFlavour; + } + tasksellogicTypeInput.readOnly = (createEditOrView != "CREATE" && createEditOrView != "EDIT"); + + divUL.appendChild(tasksellogicdiv); + + // Output mappings + var outputsLI = document.createElement("li"); + divUL.appendChild(outputsLI); + var outputsLabel = document.createElement("label"); + outputsLI.appendChild(outputsLabel); + outputsLabel.innerHTML = "State Output Mappings: "; + outputsLabel.setAttribute("for", "editPolicyFormOutputsUL" + "_" + statename); + var outsUL = document.createElement("ul"); + outsUL.setAttribute("id", "editPolicyFormOutputsUL" + "_" + statename); + outputsLI.appendChild(outsUL); + // Direct Output Mappings + var dir_outputsLI = document.createElement("li"); + outsUL.appendChild(dir_outputsLI); + var dir_outputsLabel = document.createElement("label"); + dir_outputsLI.appendChild(dir_outputsLabel); + dir_outputsLI.innerHTML = "Direct State Output Mappings: "; + dir_outputsLabel.setAttribute("for", "editPolicyFormDirOutputsTable" + "_" + statename); + var dir_outputstable = document.createElement("table"); + dir_outputstable.setAttribute("id", "editPolicyFormDirOutputsTable" + "_" + statename); + dir_outputstable.setAttribute("name", "editPolicyFormDirOutputsTable" + "_" + statename); + dir_outputstable.setAttribute("class", "table-policyoutput"); + dir_outputsLI.appendChild(dir_outputstable); + var dir_outputstable_head = document.createElement("thead"); + dir_outputstable.appendChild(dir_outputstable_head); + var dir_outputstable_head_tr = document.createElement("tr"); + dir_outputstable_head.appendChild(dir_outputstable_head_tr); + dir_outputstable_head_tr.appendChild(document.createElement("th")); // empty, + // for + // delete + // button + var dir_outputstable_name_head_th = document.createElement("th"); + dir_outputstable_head_tr.appendChild(dir_outputstable_name_head_th); + dir_outputstable_name_head_th.innerHTML = "Local Name for Output Mapping: "; + dir_outputstable_name_head_th.setAttribute("class", "table-policyoutput-heading form-heading"); + var dir_outputstable_nextstate_head_th = document.createElement("th"); + dir_outputstable_head_tr.appendChild(dir_outputstable_nextstate_head_th); + dir_outputstable_nextstate_head_th.innerHTML = "Next State: "; + dir_outputstable_nextstate_head_th.setAttribute("class", "table-policyoutput-heading form-heading"); + var dir_outputstable_event_head_th = document.createElement("th"); + dir_outputstable_head_tr.appendChild(dir_outputstable_event_head_th); + dir_outputstable_event_head_th.innerHTML = "State Output Event: "; + dir_outputstable_event_head_th.setAttribute("class", "table-policyoutput-heading form-heading"); + var dir_outputstable_body = document.createElement("tbody"); + dir_outputstable.appendChild(dir_outputstable_body); + var stateNextStateOptions = new Array(); + stateNextStateOptions.push({ + "name" : "NULL", + "displaytext" : "None", + "state" : null + }); + if (policy && policy.state && policy.state.entry && $.isArray(policy.state.entry)) { + for (var s = 0; s < policy.state.entry.length; s++) { + var st = policy.state.entry[s]; + if (statename != st.key) { // state cannot have itself as nextstate + stateNextStateOptions.push({ + "name" : st.key, + "displaytext" : st.key, + "state" : st.value + }); + } + } + } + if (state && state.stateOutputs && $.isArray(state.stateOutputs.entry)) { + for (var p = 0; p < state.stateOutputs.entry.length; p++) { + var outputEntry = state.stateOutputs.entry[p]; + var outputName = outputEntry.key; + var nextState = null; + var nxtst = outputEntry.value.nextState.localName; + if (nxtst != null && nxtst.toUpperCase() != "NULL") { + nextState = { + "name" : nxtst, + "displaytext" : nxtst + }; + } + if (nxtst != null && nxtst.toUpperCase() == "NULL") { + nextState = { + "name" : "NULL", + "displaytext" : "None" + }; + } + var outEvent = null; + var oute = outputEntry.value.outgoingEvent; + if (oute != null && oute.name != null && oute.version != null) { + outEvent = { + "name" : oute.name, + "version" : oute.version, + "displaytext" : oute.name + ":" + oute.version + }; + } + editPolicyForm_State_addStateDirectOutput(dir_outputstable_body, (createEditOrView == "VIEW"), statename, + state, outputName, nextState, outEvent, stateNextStateOptions, events); + } + } + // add the new Direct output button + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var dir_outputTR = document.createElement("tr"); + dir_outputTR.setAttribute("class", "field-policyoutput-tr.new"); + dir_outputstable_body.appendChild(dir_outputTR); + var dir_outputTD = document.createElement("td"); + dir_outputTD.setAttribute("colspan", "4"); + dir_outputTR.appendChild(dir_outputTD); + var addStateDirOutput = createAddFormButton("Add New Direct State Output Mapping") + dir_outputTD.appendChild(addStateDirOutput); + // addStateDirOutput.setAttribute("id", + // "editPolicyFormDirOutputsAddOutput"+"_"+statename); + // addStateDirOutput.setAttribute("class", "ebBtn ebBtn_large"); + // addStateDirOutput.setAttribute("type", "submit"); + // addStateDirOutput.setAttribute("value", Add New Direct State Output + // Mapping); + // addStateDirOutput.innerHTML = + // addStateDirOutput.getAttribute("value"); + addStateDirOutput.onclick = function() { + return editPolicyForm_State_addStateDirectOutput(dir_outputstable_body, false, statename, state, null, + null, null, stateNextStateOptions, events); + }; + } + // Logic-based Output Mappings + var logic_outputsLI = document.createElement("li"); + outsUL.appendChild(logic_outputsLI); + var logic_outputsLabel = document.createElement("label"); + logic_outputsLI.appendChild(dir_outputsLabel); + logic_outputsLI.innerHTML = "Logic-based State Output Mappings / Finalizers: "; + logic_outputsLabel.setAttribute("for", "editPolicyFormLogicOutputsTable" + "_" + statename); + var logic_outputstable = document.createElement("table"); + logic_outputstable.setAttribute("id", "editPolicyFormLogicOutputsTable" + "_" + statename); + logic_outputstable.setAttribute("name", "editPolicyFormLogicOutputsTable" + "_" + statename); + logic_outputstable.setAttribute("class", "table-policyoutput"); + logic_outputsLI.appendChild(logic_outputstable); + var logic_outputstable_head = document.createElement("thead"); + logic_outputstable.appendChild(logic_outputstable_head); + var logic_outputstable_head_tr = document.createElement("tr"); + logic_outputstable_head.appendChild(logic_outputstable_head_tr); + logic_outputstable_head_tr.appendChild(document.createElement("th")); // empty, + // for + // delete + // button + var logic_outputstable_name_head_th = document.createElement("th"); + logic_outputstable_head_tr.appendChild(logic_outputstable_name_head_th); + logic_outputstable_name_head_th.innerHTML = "Local Name for Output Mapping: "; + logic_outputstable_name_head_th.setAttribute("class", "table-policyoutput-heading form-heading"); + var logic_outputstablelogic_head_th = document.createElement("th"); + logic_outputstable_head_tr.appendChild(logic_outputstablelogic_head_th); + logic_outputstablelogic_head_th.style.textAlign = "left"; + logic_outputstablelogic_head_th.innerHTML = "Output Mapping / Finalizer Logic: "; + logic_outputstablelogic_head_th.setAttribute("class", "table-policyoutput-heading form-heading"); + var logic_outputstable_body = document.createElement("tbody"); + logic_outputstable.appendChild(logic_outputstable_body); + if (state && state.stateFinalizerLogicMap && $.isArray(state.stateFinalizerLogicMap.entry)) { + for (var p = 0; p < state.stateFinalizerLogicMap.entry.length; p++) { + var outputEntry = state.stateFinalizerLogicMap.entry[p]; + var outputName = outputEntry.key; + var logic = null; + if (outputEntry.value != null && outputEntry.value.logic != null) { + logic = outputEntry.value.logic; + } + var flavour = null; + if (outputEntry.value != null && outputEntry.value.logicFlavour != null) { + flavour = outputEntry.value.logicFlavour; + } + editPolicyForm_State_addStateLogicOutput(logic_outputstable_body, (createEditOrView == "VIEW"), statename, + state, outputName, logic, flavour); + } + } + // add the new Logic output button + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var logic_outputTR = document.createElement("tr"); + logic_outputTR.setAttribute("class", "field-policyoutput-tr.new"); + logic_outputstable_body.appendChild(logic_outputTR); + var logic_outputTD = document.createElement("td"); + logic_outputTD.setAttribute("colspan", "3"); + logic_outputTR.appendChild(logic_outputTD); + var addStateLogicOutput = createAddFormButton("Add New Logic-based State Output Mapping / Finalizer"); + logic_outputTD.appendChild(addStateLogicOutput); + // addStateLogicOutput.setAttribute("id", + // "editPolicyFormLogicOutputsAddOutput"+"_"+statename); + // addStateLogicOutput.setAttribute("class", "ebBtn ebBtn_large"); + // addStateLogicOutput.setAttribute("type", "submit"); + // addStateLogicOutput.setAttribute("value", "Add New Logic-based State + // Output Mapping / Finalizer"); + // addStateLogicOutput.innerHTML = + // addStateLogicOutput.getAttribute("value"); + addStateLogicOutput.onclick = function() { + return editPolicyForm_State_addStateLogicOutput(logic_outputstable_body, false, statename, state, null, + null, null); + }; + } + return retDiv; +} +function editPolicyForm_State_addStateLogicOutput(parentTBody, disabled, statename, state, outputName, logic, flavour) { + var random_suffix = formUtils_generateUUID(); + var outputTR = parentTBody.insertRow(parentTBody.rows.length - 1); + outputTR.style.verticalAlign = "top"; + outputTR.style.textAlign = "left"; + outputTR.setAttribute("finalizer_id", random_suffix); + outputTR.setAttribute("class", "field-policyoutput-tr"); + if (outputName == null && !disabled) { + outputTR.setAttribute("class", "field-policyoutput-tr.new"); + } + // delete + var deleteTD = document.createElement("td"); + outputTR.appendChild(deleteTD); + var deleteDiv = document.createElement("div"); + deleteTD.appendChild(deleteDiv); + if (!disabled) { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete"); + deleteDiv.onclick = function(event) { + $(outputTR).hide("fast", function() { + outputTR.parentNode.removeChild(outputTR); + }); + }; + } else { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete ebIcon_disabled"); + } + // name + var nameTD = document.createElement("td"); + nameTD.style.whiteSpace = "nowrap"; + outputTR.appendChild(nameTD); + var nameInput = document.createElement("input"); + nameTD.appendChild(nameInput); + nameInput.setAttribute("id", "editPolicyFormLogicOutputNameValue" + "_" + statename + "_" + random_suffix); + nameInput.setAttribute("type", "text"); + nameInput.setAttribute("name", "editPolicyFormLogicOutputNameValue" + "_" + statename + "_" + random_suffix); + nameInput.setAttribute("class", "field-policy-outputname"); + if (outputName == null && logic == null && flavour == null && !disabled) { + nameInput.setAttribute("class", "field-policy-outputname.new ebInput ebInput_width_xLong"); + } + nameInput.setAttribute("placeholder", "A name for this Output mapper"); + if (outputName) { + nameInput.value = outputName; + } + nameInput.readOnly = disabled; + // logic + var logicTD = document.createElement("td"); + logicTD.style.width = "99%"; + logicTD.style.whiteSpace = "nowrap"; + outputTR.appendChild(logicTD); + var finalizerlogicdiv = document.createElement("div"); + logicTD.appendChild(finalizerlogicdiv); + finalizerlogicdiv.setAttribute("id", "editEventFormFinalizerLogicDiv" + "_" + statename + "_" + random_suffix); + var finalizerlogicLabel = document.createElement("label"); + finalizerlogicdiv.appendChild(finalizerlogicLabel); + finalizerlogicLabel.setAttribute("for", "editEventFormfinalizerLogicInput" + "_" + statename + "_" + random_suffix); + finalizerlogicLabel.innerHTML = "Logic: "; + + var logicString = ""; + if (logic != null) { + logicString = logic; + } + var edit_readOnly = disabled; + var textarea = showHideTextarea("editEventFormfinalizerLogicInput" + "_" + statename + "_" + random_suffix, logic, + false, !edit_readOnly, false); + finalizerlogicdiv.appendChild(textarea); + + // finalizerlogic type + var finalizerlogicTypeLabel = document.createElement("label"); + finalizerlogicdiv.appendChild(finalizerlogicTypeLabel); + finalizerlogicTypeLabel.setAttribute("for", "editPolicyFormFinalizerLogicTypeInput" + "_" + statename + "_" + + random_suffix); + finalizerlogicTypeLabel.innerHTML = "Type / Flavour: "; + var finalizerlogicTypeInput = document.createElement("input"); + finalizerlogicdiv.appendChild(finalizerlogicTypeInput); + finalizerlogicTypeInput.setAttribute("id", "editPolicyFormFinalizerLogicTypeInput" + "_" + statename + "_" + + random_suffix); + finalizerlogicTypeInput.setAttribute("type", "text"); + finalizerlogicTypeInput.setAttribute("name", "editPolicyFormFinalizerLogicTypeInput" + "_" + statename + "_" + + random_suffix); + finalizerlogicTypeInput.setAttribute("class", "field-finalizerLogicType ebInput ebInput_width_xLong"); + finalizerlogicTypeInput.setAttribute("placeholder", "MVEL"); + if (flavour != null) { + finalizerlogicTypeInput.value = flavour; + } + finalizerlogicTypeInput.readOnly = disabled; + + logicTD.appendChild(finalizerlogicdiv); +} + +function editPolicyForm_State_addStateDirectOutput(parentTBody, disabled, stateName, state, outputName, nextState, + outEvent, stateNextStateOptions, events) { + var random_suffix = formUtils_generateUUID(); + var outputTR = parentTBody.insertRow(parentTBody.rows.length - 1); + outputTR.setAttribute("output_id", random_suffix); + outputTR.setAttribute("class", "field-policyoutput-tr"); + if (outputName == null && nextState == null && nextState == null && !disabled) { + outputTR.setAttribute("class", "field-policyoutput-tr.new"); + } + // delete + var deleteTD = document.createElement("td"); + outputTR.appendChild(deleteTD); + var deleteDiv = document.createElement("div"); + deleteTD.appendChild(deleteDiv); + if (!disabled) { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete"); + deleteDiv.onclick = function(event) { + $(outputTR).hide("fast", function() { + outputTR.parentNode.removeChild(outputTR); + }); + } + } else { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete ebIcon_disabled"); + } + // name + var nameTD = document.createElement("td"); + outputTR.appendChild(nameTD); + var nameInput = document.createElement("input"); + nameTD.appendChild(nameInput); + nameInput.setAttribute("id", "editPolicyFormDirectOutputNameValue" + "_" + stateName + "_" + random_suffix); + nameInput.setAttribute("type", "text"); + nameInput.setAttribute("name", "editPolicyFormDirectOutputNameValue" + "_" + stateName + "_" + random_suffix); + nameInput.setAttribute("class", "field-policy-outputname ebInput ebInput_width_xLong"); + if (outputName == null && nextState == null && nextState == null && !disabled) { + nameInput.setAttribute("class", "field-policy-outputname.new ebInput ebInput_width_xLong"); + } + nameInput.setAttribute("placeholder", "A name for this Output mapper"); + if (outputName) { + nameInput.value = outputName; + } + nameInput.readOnly = disabled; + // outputEvent + var outeventTD = document.createElement("td"); + var outeventSelectDiv = dropdownList("editPolicyFormOutputEventValue" + "_" + stateName + "_" + random_suffix, + events, outEvent, disabled, null); + outeventTD.appendChild(outeventSelectDiv); + // nextstate + var nextstateTD = document.createElement("td"); + var nextstateSelectDiv = dropdownList("editPolicyFormOutputNextStateValue" + "_" + stateName + "_" + random_suffix, + stateNextStateOptions, nextState, disabled, null, function() { + return editPolicyForm_getNextStateOptions(); + }); + nextstateTD.appendChild(nextstateSelectDiv); + + outputTR.appendChild(nextstateTD); + outputTR.appendChild(outeventTD); + +} + +function editPolicyForm_State_addPolicyContext(parentTBody, disabled, stateName, contextName, contextreference, + contextAlbums) { + var random_suffix = formUtils_generateUUID(); + var contextTR = parentTBody.insertRow(parentTBody.rows.length - 1); + contextTR.setAttribute("context_id", random_suffix); + contextTR.setAttribute("class", "field-policycontext-tr"); + if (contextName == null && contextreference == null && !disabled) { + contextTR.setAttribute("class", "field-policycontext-tr.new"); + } + // delete + var deleteTD = document.createElement("td"); + contextTR.appendChild(deleteTD); + var deleteDiv = document.createElement("div"); + deleteTD.appendChild(deleteDiv); + if (!disabled) { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete"); + deleteDiv.onclick = function(event) { + $(contextTR).hide("fast", function() { + contextTR.parentNode.removeChild(contextTR); + }); + } + } else { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete ebIcon_disabled"); + } + // context + var valueTD = document.createElement("td"); + contextTR.appendChild(valueTD); + var selectDiv = dropdownList("editPolicyFormContextValue" + "_" + stateName + "_" + random_suffix, contextAlbums, + contextreference, disabled, null); + valueTD.appendChild(selectDiv); +} + +function editPolicyForm_State_addPolicyTask(parentTBody, disabled, isdefault, state, stateName, taskreference, + taskSelected, taskOptions) { + var random_suffix = formUtils_generateUUID(); + var taskTR = parentTBody.insertRow(parentTBody.rows.length - 1); + taskTR.setAttribute("task_id", random_suffix); + taskTR.setAttribute("class", "field-policytask-tr"); + if (taskreference && taskSelected == null && !disabled) { + taskTR.setAttribute("class", "field-policytask-tr.new"); + } + // delete + var deleteTD = document.createElement("td"); + taskTR.appendChild(deleteTD); + var deleteDiv = document.createElement("div"); + deleteTD.appendChild(deleteDiv); + if (!disabled) { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete"); + deleteDiv.onclick = function(event) { + $(taskTR).hide("fast", function() { + taskTR.parentNode.removeChild(taskTR); + }); + } + } else { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete ebIcon_disabled"); + } + // default + var defaulttaskTD = document.createElement("td"); + taskTR.appendChild(defaulttaskTD); + var defaulttaskInput = document.createElement("input"); + defaulttaskTD.appendChild(defaulttaskInput); + defaulttaskInput.setAttribute("id", "editPolicyFormTaskIsDefault" + "_" + stateName + "_" + random_suffix); + defaulttaskInput.setAttribute("value", "editPolicyFormTaskIsDefault" + "_" + stateName + "_" + random_suffix); + defaulttaskInput.setAttribute("type", "radio"); + defaulttaskInput.setAttribute("name", "editPolicyFormTaskIsDefault" + "_" + stateName); // group + // name + defaulttaskInput.setAttribute("class", "field-policy-taskisdefault"); + if (taskreference == null && taskSelected == null && !disabled) { + defaulttaskInput.setAttribute("class", "field-policy-taskisdefault.new"); + } + defaulttaskInput.checked = isdefault; + defaulttaskInput.readOnly = disabled; + // localname + var localnameTD = document.createElement("td"); + taskTR.appendChild(localnameTD); + var localnameInput = document.createElement("input"); + localnameTD.appendChild(localnameInput); + localnameInput.setAttribute("id", "editPolicyFormTaskLocalNameValue" + "_" + stateName + "_" + random_suffix); + localnameInput.setAttribute("type", "text"); + localnameInput.setAttribute("name", "editPolicyFormTaskLocalNameValue" + "_" + stateName + "_" + random_suffix); + localnameInput.setAttribute("class", "field-policy-tasklocalname ebInput ebInput_width_xLong"); + if (taskreference == null && taskSelected == null && !disabled) { + localnameInput.setAttribute("class", "field-policy-tasklocalname.new ebInput ebInput_width_xLong"); + } + localnameInput.setAttribute("placeholder", "Task's Local Name"); + if (taskreference != null && taskreference.key != null && taskreference.key.localName != null) { + localnameInput.value = taskreference.key.localName; + } + localnameInput.readOnly = disabled; + // task + var valueTD = document.createElement("td"); + taskTR.appendChild(valueTD); + var selectDiv = dropdownList("editPolicyFormTaskValue" + "_" + stateName + "_" + random_suffix, taskOptions, + taskSelected, disabled, null); + valueTD.appendChild(selectDiv); + // output type + var outputTypeDirectTD = document.createElement("td"); + taskTR.appendChild(outputTypeDirectTD); + var outputTypeDirectLabel = document.createElement("label"); + outputTypeDirectTD.appendChild(outputTypeDirectLabel); + outputTypeDirectLabel.setAttribute("for", "editPolicyFormTaskOutputType" + "_" + stateName + "_" + random_suffix + + "_DIRECT"); + outputTypeDirectLabel.setAttribute("class", "label-policy-taskoutputtype"); + outputTypeDirectLabel.innerHTML = " DIRECT"; + var outputTypeDirectInput = document.createElement("input"); + outputTypeDirectLabel.appendChild(outputTypeDirectInput); + outputTypeDirectInput.setAttribute("id", "editPolicyFormTaskOutputType" + "_" + stateName + "_" + random_suffix + + "_DIRECT"); + outputTypeDirectInput.setAttribute("value", "DIRECT"); + outputTypeDirectInput.setAttribute("type", "radio"); + outputTypeDirectInput.setAttribute("name", "editPolicyFormTaskOutputType" + "_" + stateName + "_" + random_suffix); // group + // name + outputTypeDirectInput.setAttribute("class", "field-policy-taskoutputtype"); + if (taskreference == null && taskSelected == null && !disabled) { + outputTypeDirectInput.setAttribute("class", "field-policy-taskoutputtype.new"); + } + if (taskreference != null && taskreference.outputType != null && taskreference.outputType.toUpperCase() == "DIRECT") { + outputTypeDirectInput.checked = true; + } + outputTypeDirectInput.readOnly = disabled; + var outputTypeLogicTD = document.createElement("td"); + taskTR.appendChild(outputTypeLogicTD); + var outputTypeLogicLabel = document.createElement("label"); + outputTypeLogicTD.appendChild(outputTypeLogicLabel); + outputTypeLogicLabel.setAttribute("for", "editPolicyFormTaskOutputType" + "_" + stateName + "_" + random_suffix + + "_LOGIC"); + outputTypeLogicLabel.setAttribute("class", "label-policy-taskoutputtype"); + outputTypeLogicLabel.innerHTML = " LOGIC"; + var outputTypeLogicInput = document.createElement("input"); + outputTypeLogicLabel.appendChild(outputTypeLogicInput); + outputTypeLogicInput.setAttribute("id", "editPolicyFormTaskOutputType" + "_" + stateName + "_" + random_suffix + + "_LOGIC"); + outputTypeLogicInput.setAttribute("value", "LOGIC"); + outputTypeLogicInput.setAttribute("type", "radio"); + outputTypeLogicInput.setAttribute("name", "editPolicyFormTaskOutputType" + "_" + stateName + "_" + random_suffix); // group + // name + outputTypeLogicInput.setAttribute("class", "field-policy-taskoutputtype"); + if (taskreference && taskSelected == null && !disabled) { + outputTypeLogicInput.setAttribute("class", "field-policy-taskoutputtype.new"); + } + if (taskreference != null && taskreference.outputType != null && taskreference.outputType.toUpperCase() == "LOGIC") { + outputTypeLogicInput.checked = true; + } + outputTypeLogicInput.readOnly = disabled; + // output selected + var outputSelectionTD = document.createElement("td"); + taskTR.appendChild(outputSelectionTD); + var dir_outputselected = null; + var logic_outputselected = null; + if (taskreference != null && taskreference.output != null && taskreference.output.localName != null + && taskreference.outputType != null && taskreference.outputType.toUpperCase() == "DIRECT") { + dir_outputselected = { + "name" : taskreference.output.localName, + "displaytext" : taskreference.output.localName + }; + } else if (taskreference != null && taskreference.output != null && taskreference.output.localName != null + && taskreference.outputType != null && taskreference.outputType.toUpperCase() == "LOGIC") { + logic_outputselected = { + "name" : taskreference.output.localName, + "displaytext" : taskreference.output.localName + }; + } + var dir_outputOptions = new Array(); + if (state != null && state.stateOutputs != null && $.isArray(state.stateOutputs.entry)) { + for (var p = 0; p < state.stateOutputs.entry.length; p++) { + var outputEntry = state.stateOutputs.entry[p].key; + dir_outputOptions.push({ + "name" : outputEntry, + "displaytext" : outputEntry + }); + } + } + var logic_outputOptions = new Array(); + if (state != null && state.stateFinalizerLogicMap != null && $.isArray(state.stateFinalizerLogicMap.entry)) { + for (var p = 0; p < state.stateFinalizerLogicMap.entry.length; p++) { + var outputEntry = state.stateFinalizerLogicMap.entry[p].key; + logic_outputOptions.push({ + "name" : outputEntry, + "displaytext" : outputEntry + }); + } + } + var dir_selectDiv = document.createElement("div"); + dir_selectDiv.appendChild(new dropdownList("editPolicyFormTaskDirectOutputSelection" + "_" + stateName + "_" + + random_suffix, dir_outputOptions, dir_outputselected, disabled, null, function() { + return editPolicyForm_State_getDirectOutputMappingOptions(stateName); + })); + outputSelectionTD.appendChild(dir_selectDiv); + var logic_selectDiv = document.createElement("div"); + logic_selectDiv.appendChild(dropdownList("editPolicyFormTaskLogicOutputSelection" + "_" + stateName + "_" + + random_suffix, logic_outputOptions, logic_outputselected, disabled, null, function() { + return editPolicyForm_State_getLogicOutputMappingOptions(stateName); + })); + outputSelectionTD.appendChild(logic_selectDiv); + if (outputTypeLogicInput.checked) { + dir_selectDiv.style.display = "none"; + logic_selectDiv.style.display = "inline"; + } else if (outputTypeDirectInput.checked) { + dir_selectDiv.style.display = "inline"; + logic_selectDiv.style.display = "none"; + } else { + dir_selectDiv.style.display = "none"; + logic_selectDiv.style.display = "none"; + } + outputTypeDirectInput.onclick = function() { + if (this.checked) { + dir_selectDiv.style.display = "inline"; + logic_selectDiv.style.display = "none"; + } else { + dir_selectDiv.style.display = "none"; + logic_selectDiv.style.display = "inline"; + } + }; + outputTypeLogicInput.onclick = function() { + if (this.checked) { + dir_selectDiv.style.display = "none"; + logic_selectDiv.style.display = "inline"; + } else { + dir_selectDiv.style.display = "inline"; + logic_selectDiv.style.display = "none"; + } + }; +} + +function editPolicyForm_State_getLogicOutputMappingOptions(statename) { + var outputoptions = new Array(); + var finalizerstablerows = document.getElementById("editPolicyFormLogicOutputsTable_" + statename).rows; + if (finalizerstablerows && finalizerstablerows.length > 2) { // has head + // so just + // ignore + // (2) top + // row and + // bottom + // row + for (var i = 1; i < finalizerstablerows.length - 1; i++) { + var finalizerTR = finalizerstablerows[i]; + if (finalizerTR && finalizerTR.getAttribute("finalizer_id")) { + var finalizer_id = finalizerTR.getAttribute("finalizer_id"); + var finalizerlocalname = document.getElementById("editPolicyFormLogicOutputNameValue_" + statename + + "_" + finalizer_id).value; + if (finalizerlocalname != null && finalizerlocalname != "") { + outputoptions.push({ + "name" : finalizerlocalname, + "displaytext" : finalizerlocalname + }); + } + } + } + } + return outputoptions; +} + +function editPolicyForm_State_getDirectOutputMappingOptions(statename) { + var outputoptions = new Array(); + var outputstablerows = document.getElementById("editPolicyFormDirOutputsTable_" + statename).rows; + if (outputstablerows && outputstablerows.length > 2) { // has head so just + // ignore (2) top + // row and bottom + // row + for (var i = 1; i < outputstablerows.length - 1; i++) { + var outputTR = outputstablerows[i]; + if (outputTR && outputTR.getAttribute("output_id")) { + var output_id = outputTR.getAttribute("output_id"); + var outputlocalname = document.getElementById("editPolicyFormDirectOutputNameValue_" + statename + "_" + + output_id).value; + if (outputlocalname != null && outputlocalname != "") { + outputoptions.push({ + "name" : outputlocalname, + "displaytext" : outputlocalname + }); + } + } + } + } + return outputoptions; +} + +function editPolicyForm_State_getStateBean(statename) { + if (statename == null || statename == "") { + console.error("Request for '" + statename + "' state!"); + alert("Request for '" + statename + "' state!"); + return null; + } + var div = document.getElementById("editPolicyFormStateDiv_" + statename); + if (div == null) { + console.error("State information requested for state " + statename + ", but that state does not exist!") + alert("State information requested for state " + statename + ", but that state does not exist!"); + return null; + } + var ret = new Object(); + // name + ret["name"] = statename; + // trigger + var triggervalue = document.getElementById("editPolicyFormTrigger_" + statename + "_dropdownList").selectedOption; + ret["trigger"] = null; + if (triggervalue != null && triggervalue.event != null) { + ret.trigger = { + "name" : triggervalue.event.key.name, + "version" : triggervalue.event.key.version + }; + } + // context + var statebean_context = new Array(); + var contextstablerows = document.getElementById("editPolicyFormContextsTable_" + statename).rows; + if (contextstablerows && contextstablerows.length > 1) { // no head so + // just ignore + // (1) bottom + // row + for (var i = 0; i < contextstablerows.length - 1; i++) { + var contextTR = contextstablerows[i]; + if (contextTR && contextTR.getAttribute("context_id")) { + var context_id = contextTR.getAttribute("context_id"); + var contextvalue = document.getElementById("editPolicyFormContextValue_" + statename + "_" + context_id + + "_dropdownList").selectedOption; + if (contextvalue != null && contextvalue.album != null) { + statebean_context.push({ + "name" : contextvalue.album.key.name, + "version" : contextvalue.album.key.version + }); + } + } + } + } + ret["contexts"] = statebean_context; + // outputs + var statebean_outputs = new Object(); + var outputstablerows = document.getElementById("editPolicyFormDirOutputsTable_" + statename).rows; + if (outputstablerows && outputstablerows.length > 2) { // has head so just + // ignore (2) top + // row and bottom + // row + for (var i = 1; i < outputstablerows.length - 1; i++) { + var outputTR = outputstablerows[i]; + if (outputTR && outputTR.getAttribute("output_id")) { + var output_id = outputTR.getAttribute("output_id"); + var outputlocalname = document.getElementById("editPolicyFormDirectOutputNameValue_" + statename + "_" + + output_id).value; + if (outputlocalname == null || outputlocalname == "") { + console.error("No Local Name entered for Direct Output Mapping #" + i + " for state " + statename); + alert("No Local Name entered for Direct Output Mapping #" + i + " for state " + statename); + return null; + } + var nextstatevalue = document.getElementById("editPolicyFormOutputNextStateValue_" + statename + "_" + + output_id + "_dropdownList").selectedOption; + var nextstatename; + if (nextstatevalue == null) { + console.error("An option must be selected for Next State for Direct Output Mapping " + + outputlocalname + " for state " + statename); + alert("An option must be selected for Next State for Direct Output Mapping " + outputlocalname + + " for state " + statename); + return null; + } else if (nextstatevalue.name.toUpperCase() == "NULL") { + nextstatename = null; + } else { + nextstatename = nextstatevalue.name; + } + + var nexteventvalue = document.getElementById("editPolicyFormOutputEventValue_" + statename + "_" + + output_id + "_dropdownList").selectedOption; + if (nexteventvalue == null || nexteventvalue.event == null || nexteventvalue.event.key == null) { + console.error("No Output Event selected for Direct Output Mapping " + outputlocalname + + " for state " + statename); + alert("No Output Event selected for Direct Output Mapping " + outputlocalname + " for state " + + statename); + return null; + } + var nextevent = { + "name" : nexteventvalue.event.key.name, + "version" : nexteventvalue.event.key.version + }; + statebean_outputs[outputlocalname] = { + "event" : nextevent, + "nextState" : nextstatename + }; + } + } + } + ret["stateOutputs"] = statebean_outputs; + // finalizers + var statebean_finalizers = new Object(); + var finalizerstablerows = document.getElementById("editPolicyFormLogicOutputsTable_" + statename).rows; + if (finalizerstablerows && finalizerstablerows.length > 2) { // has head + // so just + // ignore + // (2) top + // row and + // bottom + // row + for (var i = 1; i < finalizerstablerows.length - 1; i++) { + var finalizerTR = finalizerstablerows[i]; + if (finalizerTR && finalizerTR.getAttribute("finalizer_id")) { + var finalizer_id = finalizerTR.getAttribute("finalizer_id"); + var finalizerlocalname = document.getElementById("editPolicyFormLogicOutputNameValue_" + statename + + "_" + finalizer_id).value; + if (finalizerlocalname == null || finalizerlocalname == "") { + console.error("No Local Name entered for Logic-based Output Mapping #" + i + " for state " + + statename); + alert("No Local Name entered for Logic-based Output Mapping #" + i + " for state " + statename); + return null; + } + + var finalizerlogicvalue = document.getElementById("editEventFormfinalizerLogicInput_" + statename + "_" + + finalizer_id + "_textarea").value; + if (finalizerlogicvalue == null || finalizerlogicvalue == "") { + console.error("No Logic is specified for Logic-based Output Mapping " + finalizerlocalname + + " for state " + statename); + alert("No Logic is specified for Logic-based Output Mapping " + finalizerlocalname + " for state " + + statename); + return null; + } + + var finalizerlogictypevalue = document.getElementById("editPolicyFormFinalizerLogicTypeInput_" + + statename + "_" + finalizer_id).value; + if (finalizerlogictypevalue == null || finalizerlogictypevalue == "") { + console.error("No Logic Type is specified for Logic-based Output Mapping " + finalizerlocalname + + " for state " + statename); + alert("No Logic Type is specified for Logic-based Output Mapping " + finalizerlocalname + + " for state " + statename); + return null; + } + statebean_finalizers[finalizerlocalname] = { + "logic" : finalizerlogicvalue, + "logicFlavour" : finalizerlogictypevalue + }; + } + } + } + ret["finalizers"] = statebean_finalizers; + // tasks & defaulttask + var statebean_tasks = new Object(); + var statebean_defaultTask = null; + var taskstablerows = document.getElementById("editPolicyFormTasksTable_" + statename).rows; + if (taskstablerows == null || taskstablerows.length <= 2) { + alert("No tasks selected for state " + statename); + console.error("No tasks selected for state " + statename); + return null; + } else { // has head so just ignore (2) top row and bottom row + for (var i = 1; i < taskstablerows.length - 1; i++) { + var taskTR = taskstablerows[i]; + if (taskTR && taskTR.getAttribute("task_id")) { + var task_id = taskTR.getAttribute("task_id"); + var tasklocalname = document.getElementById("editPolicyFormTaskLocalNameValue_" + statename + "_" + + task_id).value; + if (tasklocalname == "") { + console.error("No Local Name entered for task #" + i + " for state " + statename); + alert("No Local Name entered for task #" + i + " for state " + statename); + return null; + } + if (statebean_tasks[tasklocalname] != null) { + console.error("There cannot be more than one task called " + tasklocalname + " for state " + + statename); + alert("There cannot be more than one task called " + tasklocalname + " for state " + statename); + return null; + } + var taskvalue = document.getElementById("editPolicyFormTaskValue_" + statename + "_" + task_id + + "_dropdownList").selectedOption; + if (taskvalue == null || taskvalue.task == null) { + console.error("No Task selected for task " + tasklocalname + " for state " + statename); + alert("No Task selected for task " + tasklocalname + " for state " + statename); + return null; + } + var task = taskvalue.task; + var r = document.querySelector('input[name="editPolicyFormTaskOutputType_' + statename + '_' + task_id + + '"]:checked'); + if (r == null) { + console.error("No Output Mapping type selected for task " + tasklocalname + " for state " + + statename); + alert("No Output Mapping type selected for task " + tasklocalname + " for state " + statename); + return null; + } + var outputtype = r.value; + var outputname = null; + if (outputtype == "DIRECT") { + var diroutput = document.getElementById("editPolicyFormTaskDirectOutputSelection_" + statename + + "_" + task_id + "_dropdownList").selectedOption; + if (diroutput == null) {// } || diroutput.output == null){ + console.error("No DIRECT Output Mapping selected for task " + tasklocalname + " for state " + + statename); + alert("No DIRECT Output Mapping selected for task " + tasklocalname + " for state " + statename); + } + outputname = diroutput.name; + } else if (outputtype == "LOGIC") { + var logoutput = document.getElementById("editPolicyFormTaskLogicOutputSelection_" + statename + "_" + + task_id + "_dropdownList").selectedOption; + if (logoutput == null || logoutput.name == null) { + console.error("No LOGIC Output Mapping selected for task " + tasklocalname + " for state " + + statename); + alert("No LOGIC Output Mapping selected for task " + tasklocalname + " for state " + statename); + } + outputname = logoutput.name; + } else { + console.error("Unknown Output Mapping type ('" + outputtype + "') selected for task " + + tasklocalname + " for state " + statename); + alert("Unknown Output Mapping type ('" + outputtype + "') selected for task " + tasklocalname + + " for state " + statename); + return null; + } + statebean_tasks[tasklocalname] = { + "task" : { + "name" : task.key.name, + "version" : task.key.version + }, + "outputType" : outputtype, + "outputName" : outputname + }; + + var r2 = document.getElementById("editPolicyFormTaskIsDefault_" + statename + "_" + task_id); + if (taskstablerows.length <= 3 || (r2 != null && r2.checked == true)) { // default + // is + // checked + // or + // there + // is + // only + // one + // task + statebean_defaultTask = { + "name" : task.key.name, + "version" : task.key.version + }; + } + + } + } + } + ret["tasks"] = statebean_tasks; + ret["defaultTask"] = statebean_defaultTask; + // tasksellogic + var tsl = document.getElementById("editEventFormTaskSelLogicInput_" + statename + "_textarea").value; + var tsl_type = document.getElementById("editPolicyFormTaskSelLogicTypeInput_" + statename).value; + if (tsl == null || tsl == "" || tsl_type == null || tsl_type == "") { + if (statebean_tasks != null && taskstablerows.length > 3) { // there is + // more than + // 1 task + console + .error("State " + + statename + + " has more than one task reference so Task Selection Logic and Task Selection Logic type must be specified"); + alert("State " + + statename + + " has more than one task reference so Task Selection Logic and Task Selection Logic type must be specified"); + return null; + } + } else if ((tsl == null || tsl == "") && (tsl_type == null || tsl_type == "")) { + ret["taskSelectionLogic"] = null; + } else { + ret["taskSelectionLogic"] = { + "logic" : tsl, + "logicFlavour" : tsl_type + }; + } + + return ret; + +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyTab.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyTab.js new file mode 100644 index 0000000..8d9788e --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyTab.js @@ -0,0 +1,211 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function policyTab_reset() { + policyTab_deactivate(); + policyTab_activate(); +} + +function policyTab_activate() { + policyTab_create(); + + var requestURL = restRootURL + "/Policy/Get?name=&version="; + + ajax_get(requestURL, function(data) { + $("#policyTableBody").find("tr:gt(0)").remove(); + + for (var i = 0; i < data.messages.message.length; i++) { + var policy = JSON.parse(data.messages.message[i]).apexPolicy; + + var policyRow_tr = document.createElement("tr"); + var policyid = policy.policyKey.name + ":" + policy.policyKey.version; + + var policyTableRow = + "" + + policyid + + "" + + "" + + policy.template + + "" + + "" + + policy.firstState + + ""; + + policyTableRow += ""; + policyTableRow += ""; + + var states = policy.state.entry; + for(var s in states) { + var state = states[s]; + if(state.key == policy.firstState) { + states.splice(s, 1); + states.unshift(state); + break; + } + } + + for (var s = 0; s < policy.state.entry.length; s++) { + var stateName = policy.state.entry[s].key; + var state = policy.state.entry[s].value; + + policyTableRow += + "" + + ""; + + policyTableRow += ""; + + policyTableRow += + "" + + ""; + + policyTableRow += ""; + + policyTableRow += ""; + + + policyTableRow += ""; + + policyTableRow += ""; + } + + policyTableRow += "
StateTriggerReferenced TasksDefault TaskTSLState OutputsState Finsalizer LogicContext Album References
" + + stateName + + "" + + state.trigger.name + ":" + state.trigger.version + + ""; + for (var t = 0; t < state.taskReferences.entry.length; t++) { + var taskKey = state.taskReferences.entry[t].key; + var taskRef = state.taskReferences.entry[t].value; + + policyTableRow += + "" + + "" + + ""; + } + policyTableRow += "
Task ReferenceOutput TypeOutput
" + + taskKey.name + ":" + taskKey.version + + "" + + taskRef.outputType + + "" + + taskRef.output.localName + + "
" + + state.defaultTask.name + ":" + state.defaultTask.version + + "" + + state.taskSelectionLogic.logicFlavour + + ""; + for (var o = 0; o < state.stateOutputs.entry.length; o++) { + var outputEntry = state.stateOutputs.entry[o]; + + policyTableRow += + "" + + "" + + ""; + } + policyTableRow += "
NameNext StateEvent
" + + outputEntry.key + + "" + + outputEntry.value.nextState.localName + + "" + + outputEntry.value.outgoingEvent.name + ":" + outputEntry.value.outgoingEvent.version + + "
"; + for (var sf = 0; sf < state.stateFinalizerLogicMap.entry.length; sf++) { + var sflEntry = state.stateFinalizerLogicMap.entry[sf]; + + policyTableRow += + "" + + ""; + } + policyTableRow += "
NameType
" + + sflEntry.key + + "" + + sflEntry.value.logicFlavour + + "
"; + for (var c = 0; c < state.contextAlbumReference.length; c++) { + var contextAlbumReference = state.contextAlbumReference[c]; + + policyTableRow += + ""; + } + policyTableRow += "
" + + contextAlbumReference.name + ":" + contextAlbumReference.version + + "
"; + + + policyRow_tr.innerHTML = policyTableRow; + policyRow_tr.addEventListener('contextmenu', rightClickMenu_scopePreserver("policyTabContent", "Policy", policy.policyKey.name, policy.policyKey.version)); + + $("#policyTableBody").append(policyRow_tr); + } + }); +} + +function policyTab_deactivate() { + apexUtils_removeElement("policyTabContent"); +} + +function policyTab_create() { + var policyTab = document.getElementById("policiesTab"); + + var policyTabContent = document.getElementById("policyTabContent"); + if (policyTabContent != null) { + return + } + + var policyTabContent = document.createElement("policyTabContent"); + policyTab.appendChild(policyTabContent); + policyTabContent.setAttribute("id", "policyTabContent"); + policyTabContent.addEventListener('contextmenu', rightClickMenu_scopePreserver("policyTabContent", "Policy", null, null)); + + var policyTable = createTable("policyTable"); + policyTabContent.appendChild(policyTable); + + var policyTableHeader = document.createElement("thead"); + policyTable.appendChild(policyTableHeader); + policyTableHeader.setAttribute("id", "policyTableHeader"); + + var policyTableHeaderRow = document.createElement("tr"); + policyTableHeader.appendChild(policyTableHeaderRow); + policyTableHeaderRow.setAttribute("id", "policyTableHeaderRow"); + + var policyTableKeyHeader = document.createElement("th"); + policyTableHeaderRow.appendChild(policyTableKeyHeader); + policyTableKeyHeader.setAttribute("id", "policyTableKeyHeader"); + policyTableKeyHeader.appendChild(document.createTextNode("Policy")); + + var policyTableTemplateHeader = document.createElement("th"); + policyTableHeaderRow.appendChild(policyTableTemplateHeader); + policyTableTemplateHeader.setAttribute("id", "policyTableTemplateHeader"); + policyTableTemplateHeader.appendChild(document.createTextNode("Template")); + + var policyTableFirstStateHeader = document.createElement("th"); + policyTableHeaderRow.appendChild(policyTableFirstStateHeader); + policyTableFirstStateHeader.setAttribute("id", "policyTableFirstStateHeader"); + policyTableFirstStateHeader.appendChild(document.createTextNode("First State")); + + var policyTableStatesHeader = document.createElement("th"); + policyTableHeaderRow.appendChild(policyTableStatesHeader); + policyTableStatesHeader.setAttribute("id", "policyTableStatesHeader"); + policyTableStatesHeader.appendChild(document.createTextNode("States")); + + var policyTableBody = document.createElement("tbody"); + policyTable.appendChild(policyTableBody); + policyTable.setAttribute("id", "policyTableBody"); +} \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexResultForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexResultForm.js new file mode 100644 index 0000000..b254c38 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexResultForm.js @@ -0,0 +1,89 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function resultForm_activate(formParent, formHeading, formText) { + apexUtils_removeElement("newModelDivBackground"); + + var contentelement = document.createElement("resultFormDiv"); + var formDiv = document.createElement("div"); + var backgroundDiv = document.createElement("div"); + backgroundDiv.setAttribute("id", "newModelDivBackground"); + backgroundDiv.setAttribute("class", "newModelDivBackground"); + + backgroundDiv.appendChild(formDiv); + contentelement.appendChild(backgroundDiv); + formParent.appendChild(contentelement); + + formDiv.setAttribute("id", "resultFormDiv"); + formDiv.setAttribute("class", "resultFormDiv"); + + var headingSpan = document.createElement("span"); + formDiv.appendChild(headingSpan); + + headingSpan.setAttribute("class", "headingSpan"); + headingSpan.innerHTML = formHeading; + + var form = document.createElement("resultForm"); + formDiv.appendChild(form); + + form.setAttribute("id", "resultForm"); + form.setAttribute("class", "form-style-1"); + form.setAttribute("method", "post"); + + var ul = document.createElement("ul"); + form.appendChild(ul); + + var resultTextLI = document.createElement("li"); + form.appendChild(resultTextLI); + + var resultTextLabel = document.createElement("label"); + resultTextLI.appendChild(resultTextLabel); + resultTextLabel.setAttribute("for", "resultFormTextArea"); + resultTextLabel.innerHTML = "resultText: "; + + var resultTextArea = document.createElement("textarea"); + resultTextLI.appendChild(resultTextArea); + + resultTextArea.setAttribute("id", "resultFormTextArea"); + resultTextArea.setAttribute("resultText", "resultFormTextArea"); + resultTextArea.setAttribute("class", "field-long field-textarea ebTextArea ebTextArea_width_full eb_scrollbar"); + resultTextArea.setAttribute("readonly", "readonly"); + resultTextArea.style.cursor = "text"; + + resultTextArea.value = formText; + + var inputLI = document.createElement("li"); + form.appendChild(inputLI); + + var okInput = document.createElement("input"); + inputLI.appendChild(okInput); + + okInput.setAttribute("id", "generateDescription"); + okInput.setAttribute("class", "okButton ebBtn"); + okInput.setAttribute("type", "submit"); + okInput.setAttribute("value", "OK"); + + okInput.onclick = resultForm_okPressed; +} + +function resultForm_okPressed() { + apexUtils_removeElement("newModelDivBackground"); +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTable.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTable.js new file mode 100644 index 0000000..0b6aaac --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTable.js @@ -0,0 +1,37 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function createTable(id) { + var table = document.createElement("table"); + table.setAttribute("id", id); + table.setAttribute("class", "apexTable ebTable elTablelib-Table-table ebTable_striped"); + return table; +} + +function setRowHover(rowElement) { + rowElement.className = "ebTableRow"; + rowElement.onmouseover = function() { + this.className = "ebTableRow ebTableRow_hover"; + }; + rowElement.onmouseout = function() { + this.className = "ebTableRow"; + }; +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskEditForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskEditForm.js new file mode 100644 index 0000000..d4021c0 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskEditForm.js @@ -0,0 +1,1003 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function editTaskForm_createTask(formParent) { + // Get all contextSchemas too for task input/outputfields + var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var contextSchemas = new Array(); + ajax_get(requestURL, function(data2) { + for (var i = 0; i < data2.messages.message.length; i++) { + var contextSchema = JSON.parse(data2.messages.message[i]).apexContextSchema; + var dt = { + "name" : contextSchema.key.name, + "version" : contextSchema.key.version, + "displaytext" : contextSchema.key.name + ":" + contextSchema.key.version, + "contextSchema" : contextSchema + }; + contextSchemas.push(dt); + } + // Get all contextAlbums too for task context album references + var requestURL = restRootURL + "/ContextAlbum/Get?name=&version="; + var contextAlbums = new Array(); + ajax_get(requestURL, function(data3) { + for (var i = 0; i < data3.messages.message.length; i++) { + var contextAlbum = JSON.parse(data3.messages.message[i]).apexContextAlbum; + var ca = { + "name" : contextAlbum.key.name, + "version" : contextAlbum.key.version, + "displaytext" : contextAlbum.key.name + ":" + contextAlbum.key.version, + "contextAlbum" : contextAlbum + }; + contextAlbums.push(ca); + } + editTaskForm_activate(formParent, "CREATE", null, contextSchemas, contextAlbums); + }); + }); +} + +function editTaskForm_deleteTask(parent, name, version) { + var message = "Are you sure you want to delete Task \"" + name + ":" + version + "\"?"; + if (apexUtils_areYouSure(message)) { + var requestURL = restRootURL + "/Task/Delete?name=" + name + "&version=" + version; + ajax_delete(requestURL, function(data) { + apexUtils_removeElement("editTaskFormDiv"); + taskTab_reset(); + keyInformationTab_reset() + }); + } +} + +function editTaskForm_viewTask(formParent, name, version) { + editTaskForm_editTask_inner(formParent, name, version, "VIEW"); +} + +function editTaskForm_editTask(formParent, name, version) { + editTaskForm_editTask_inner(formParent, name, version, "EDIT"); +} + +function editTaskForm_editTask_inner(formParent, name, version, viewOrEdit) { + var requestURL = restRootURL + "/Task/Get?name=" + name + "&version=" + version; + ajax_getWithKeyInfo(requestURL, "apexTask", function(task) { + // Get all contextSchemas too for task inputfields + var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var contextSchemas = new Array(); + ajax_get(requestURL, function(data2) { + for (var i = 0; i < data2.messages.message.length; i++) { + var contextSchema = JSON.parse(data2.messages.message[i]).apexContextSchema; + contextSchemas.push({ + "name" : contextSchema.key.name, + "version" : contextSchema.key.version, + "displaytext" : contextSchema.key.name + ":" + contextSchema.key.version, + "contextSchema" : contextSchema + }); + } + // Get all contextAlbums too for task context album references + var requestURL = restRootURL + "/ContextAlbum/Get?name=&version="; + var contextAlbums = new Array(); + ajax_get(requestURL, function(data3) { + for (var i = 0; i < data3.messages.message.length; i++) { + var contextAlbum = JSON.parse(data3.messages.message[i]).apexContextAlbum; + var ca = { + "name" : contextAlbum.key.name, + "version" : contextAlbum.key.version, + "displaytext" : contextAlbum.key.name + ":" + contextAlbum.key.version, + "contextAlbum" : contextAlbum + }; + contextAlbums.push(ca); + } + editTaskForm_activate(formParent, viewOrEdit, task, contextSchemas, contextAlbums); + }); + }); + }); +} + +function editTaskForm_activate(parent, operation, task, contextSchemas, contextAlbums) { + apexUtils_removeElement("editTaskFormDiv"); + var formParent = document.getElementById(parent); + apexUtils_emptyElement(parent); + + var isedit = false; + var createEditOrView = ""; + + if (!operation) { + console.warn("No operation specified for TaskForm form") + } else { + createEditOrView = operation.toUpperCase(); + } + + if (createEditOrView == "CREATE") { + isedit = true; + } else if (createEditOrView == "EDIT" || createEditOrView == "VIEW") { + if (createEditOrView == "EDIT") { + isedit = true; + } + + if (!task) { + console.warn("Invalid value (\"" + task + "\") passed as a value for \"task\" for TaskForm form."); + } else { + if (!task.key || !task.key.name || task.key.name == "") { + console.warn("Invalid value (\"" + task.key.name + + "\") passed as a value for \"name\" for TaskForm form."); + } + if (!task.key || !task.key.version || task.key.version == "") { + console.warn("Invalid value (\"" + task.key.version + + "\") passed as a value for \"version\" for TaskForm form."); + } + if (!task.uuid || task.uuid == "") { + console.warn("Invalid value (\"" + task.uuid + "\") passed as a value for \"uuid\" for TaskForm form."); + } + } + } else { + console.warn("Invalid operation (\"" + operation + + "\") specified for TaskForm form. Only \"Create\", \"Edit\" and \"View\" operations are supported"); + } + + var contentelement = document.createElement("editTaskFormDiv"); + var formDiv = document.createElement("div"); + contentelement.appendChild(formDiv); + formDiv.setAttribute("id", "editTaskFormDiv"); + formDiv.setAttribute("class", "editTaskFormDiv"); + + var headingSpan = document.createElement("h2"); + formDiv.appendChild(headingSpan); + headingSpan.innerHTML = "Task Editor"; + + var form = document.createElement("editTaskForm"); + formDiv.appendChild(form); + + form.setAttribute("id", "editTaskForm"); + form.setAttribute("class", "form-style-1"); + form.setAttribute("method", "post"); + form.setAttribute("createEditOrView", createEditOrView); + + var formul = document.createElement("ul"); + form.appendChild(formul); + + var nameLI = document.createElement("li"); + formul.appendChild(nameLI); + var nameLabel = document.createElement("label"); + nameLI.appendChild(nameLabel); + nameLabel.setAttribute("for", "editTaskFormNameInput"); + nameLabel.innerHTML = "Name: "; + var nameLabelSpan = document.createElement("span"); + nameLabel.appendChild(nameLabelSpan); + nameLabelSpan.setAttribute("class", "required"); + nameLabelSpan.innerHTML = "*"; + var nameInput = document.createElement("input"); + nameLI.appendChild(nameInput); + nameInput.setAttribute("id", "editTaskFormNameInput"); + nameInput.setAttribute("type", "text"); + nameInput.setAttribute("name", "editTaskFormNameInput"); + nameInput.setAttribute("class", "field ebInput"); + nameInput.setAttribute("placeholder", "name"); + if (task && task.key && task.key.name) { + nameInput.value = task.key.name; + } + if (createEditOrView != "CREATE") { + nameInput.readOnly = true; + } + + var versionLI = document.createElement("li"); + formul.appendChild(versionLI); + var versionLabel = document.createElement("label"); + versionLI.appendChild(versionLabel); + versionLabel.setAttribute("for", "editTaskFormVersionInput"); + versionLabel.innerHTML = "Version: "; + var versionInput = document.createElement("input"); + versionLI.appendChild(versionInput); + versionInput.setAttribute("id", "editTaskFormVersionInput"); + versionInput.setAttribute("type", "text"); + versionInput.setAttribute("name", "editTaskFormVersionInput"); + versionInput.setAttribute("class", "field ebInput"); + versionInput.setAttribute("placeholder", "0.0.1"); + if (task && task.key && task.key.version) { + versionInput.value = task.key.version; + } + if (createEditOrView != "CREATE") { + versionInput.readOnly = true; + } + + var uuidLI = document.createElement("li"); + formul.appendChild(uuidLI); + var uuidLabel = document.createElement("label"); + uuidLI.appendChild(uuidLabel); + uuidLabel.setAttribute("for", "editTaskFormUuidInput"); + uuidLabel.innerHTML = "UUID: "; + var uuidInput = document.createElement("input"); + uuidLI.appendChild(uuidInput); + uuidInput.setAttribute("id", "editTaskFormUuidInput"); + uuidInput.setAttribute("type", "text"); + uuidInput.setAttribute("name", "editTaskFormUuidInput"); + uuidInput.setAttribute("class", "field-long ebInput ebInput_width_full"); + uuidInput.setAttribute("placeholder", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"); + if (task && task.uuid) { + uuidInput.value = task.uuid; + } + if (createEditOrView != "CREATE") { + uuidInput.readOnly = true; + } + + var edit_disabled = (createEditOrView != "CREATE" && createEditOrView != "EDIT"); + + // description + var descriptionLI = document.createElement("li"); + formul.appendChild(descriptionLI); + var descriptionLabel = document.createElement("label"); + descriptionLI.appendChild(descriptionLabel); + descriptionLabel.setAttribute("for", "editTaskFormDescriptionTextArea"); + descriptionLabel.innerHTML = "Description: "; + var descriptionTextArea = document.createElement("textarea"); + descriptionLI.appendChild(descriptionTextArea); + descriptionTextArea.setAttribute("id", "editTaskFormDescriptionTextArea"); + descriptionTextArea.setAttribute("name", "editTaskFormDescriptionTextArea"); + descriptionTextArea.setAttribute("class", "field-long field-textarea ebTextArea ebTextArea_width_full"); + if (task && task.description) { + descriptionTextArea.value = task.description; + } + descriptionTextArea.readOnly = edit_disabled; + + // input fields + var inputfieldsLI = document.createElement("li"); + formul.appendChild(inputfieldsLI); + var inputfieldsLabel = document.createElement("label"); + inputfieldsLI.appendChild(inputfieldsLabel); + inputfieldsLabel.setAttribute("for", "editTaskFormInputFieldsTable"); + inputfieldsLabel.innerHTML = "Task Input Fields: "; + var inputfieldstable = document.createElement("table"); + inputfieldstable.setAttribute("id", "editTaskFormInputFieldsTable"); + inputfieldstable.setAttribute("name", "editTaskFormInputFieldsTable"); + inputfieldstable.setAttribute("class", "table-taskinputfield"); + inputfieldsLI.appendChild(inputfieldstable); + var inputfieldstable_head = document.createElement("thead"); + inputfieldstable.appendChild(inputfieldstable_head); + var inputfieldstable_head_tr = document.createElement("tr"); + inputfieldstable_head.appendChild(inputfieldstable_head_tr); + inputfieldstable_head_tr.appendChild(document.createElement("th")); // empty, + // for + // delete + // button + var inputfieldstable_head_th = document.createElement("th"); + inputfieldstable_head_tr.appendChild(inputfieldstable_head_th); + inputfieldstable_head_th.innerHTML = "Input Field Name: "; + inputfieldstable_head_th.setAttribute("class", "table-taskinputfield-heading form-heading"); + inputfieldstable_head_th = document.createElement("th"); + inputfieldstable_head_tr.appendChild(inputfieldstable_head_th); + inputfieldstable_head_th.innerHTML = "Input Field Type/Schema: "; + inputfieldstable_head_th.setAttribute("class", "table-taskinputfield-heading form-heading"); + inputfieldstable_head_th = document.createElement("th"); + inputfieldstable_head_tr.appendChild(inputfieldstable_head_th); + inputfieldstable_head_th.innerHTML = "Optional: "; + inputfieldstable_head_th.setAttribute("class", "table-eventparam-heading form-heading"); + var inputfieldstable_body = document.createElement("tbody"); + inputfieldstable.appendChild(inputfieldstable_body); + // Add the inputfields + if (task && task.inputFields && task.inputFields.entry) { + for (var p = 0; p < task.inputFields.entry.length; p++) { + var inputfieldEntry = task.inputFields.entry[p]; + var contextSchema = inputfieldEntry.value.fieldSchemaKey; + contextSchema["displaytext"] = contextSchema.name + ":" + contextSchema.version; + editTaskForm_addTaskInputField(inputfieldstable_body, (createEditOrView == "VIEW"), inputfieldEntry.key, + inputfieldEntry.value.optional, contextSchema, contextSchemas); + } + } + // add the New Input Field button + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var inputfieldTR = document.createElement("tr"); + inputfieldTR.setAttribute("class", "field-taskinputfield-tr.new"); + inputfieldstable_body.appendChild(inputfieldTR); + var inputfieldTD = document.createElement("td"); + inputfieldTD.setAttribute("colspan", "3"); + inputfieldTR.appendChild(inputfieldTD); + var addInputFieldInput = createAddFormButton(); + inputfieldTD.appendChild(addInputFieldInput); + addInputFieldInput.onclick = function() { + editTaskForm_addTaskInputField(inputfieldstable_body, false, null, false, null, contextSchemas); + }; + } + + // output fields + var outputfieldsLI = document.createElement("li"); + formul.appendChild(outputfieldsLI); + var outputfieldsLabel = document.createElement("label"); + outputfieldsLI.appendChild(outputfieldsLabel); + outputfieldsLabel.setAttribute("for", "editTaskFormOutputFieldsTable"); + outputfieldsLabel.innerHTML = "Task Output Fields: "; + var outputfieldstable = document.createElement("table"); + outputfieldstable.setAttribute("id", "editTaskFormOutputFieldsTable"); + outputfieldstable.setAttribute("name", "editTaskFormOutputFieldsTable"); + outputfieldstable.setAttribute("class", "table-taskoutputfield"); + outputfieldsLI.appendChild(outputfieldstable); + var outputfieldstable_head = document.createElement("thead"); + outputfieldstable.appendChild(outputfieldstable_head); + var outputfieldstable_head_tr = document.createElement("tr"); + outputfieldstable_head.appendChild(outputfieldstable_head_tr); + outputfieldstable_head_tr.appendChild(document.createElement("th")); // empty, + // for + // delete + // button + var outputfieldstable_head_th = document.createElement("th"); + outputfieldstable_head_tr.appendChild(outputfieldstable_head_th); + outputfieldstable_head_th.innerHTML = "Output Field Name: "; + outputfieldstable_head_th.setAttribute("class", "table-taskoutputfield-heading form-heading"); + outputfieldstable_head_th = document.createElement("th"); + outputfieldstable_head_tr.appendChild(outputfieldstable_head_th); + outputfieldstable_head_th.innerHTML = "Output Field Type/Schema: "; + outputfieldstable_head_th.setAttribute("class", "table-taskoutputfield-heading form-heading"); + outputfieldstable_head_th = document.createElement("th"); + outputfieldstable_head_tr.appendChild(outputfieldstable_head_th); + outputfieldstable_head_th.innerHTML = "Optional: "; + outputfieldstable_head_th.setAttribute("class", "table-eventparam-heading form-heading"); + var outputfieldstable_body = document.createElement("tbody"); + outputfieldstable.appendChild(outputfieldstable_body); + // Add the outputfields + if (task && task.outputFields && task.outputFields.entry) { + for (var p = 0; p < task.outputFields.entry.length; p++) { + var outputfieldEntry = task.outputFields.entry[p]; + var contextSchema = outputfieldEntry.value.fieldSchemaKey; + contextSchema["displaytext"] = contextSchema.name + ":" + contextSchema.version; + editTaskForm_addTaskOutputField(outputfieldstable_body, (createEditOrView == "VIEW"), outputfieldEntry.key, + outputfieldEntry.value.optional, contextSchema, contextSchemas); + } + } + // add the New Output Field button + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var outputfieldTR = document.createElement("tr"); + outputfieldTR.setAttribute("class", "field-taskoutputfield-tr.new"); + outputfieldstable_body.appendChild(outputfieldTR); + var outputfieldTD = document.createElement("td"); + outputfieldTD.setAttribute("colspan", "3"); + outputfieldTR.appendChild(outputfieldTD); + var addOutputFieldInput = createAddFormButton(); + outputfieldTD.appendChild(addOutputFieldInput); + addOutputFieldInput.onclick = function() { + editTaskForm_addTaskOutputField(outputfieldstable_body, false, null, false, null, contextSchemas); + }; + } + + // tasklogic + var tasklogicLI = document.createElement("li"); + formul.appendChild(tasklogicLI); + var tasklogicLabel = document.createElement("label"); + tasklogicLI.appendChild(tasklogicLabel); + tasklogicLabel.setAttribute("for", "editTaskFormTaskLogicTextArea"); + tasklogicLabel.innerHTML = "Task Logic: "; + var tlogic = null; + if (task && task.taskLogic && task.taskLogic.logic) { + tlogic = task.taskLogic.logic; + } + // showHideTextarea(id_prefix, content, initialshow, editable, disabled) + var textarea = showHideTextarea("editTaskFormTaskLogicTextArea", tlogic, false, !edit_disabled, false); + + tasklogicLI.appendChild(textarea); + + // tasklogic type + var taskLogicTypeLI = document.createElement("li"); + formul.appendChild(taskLogicTypeLI); + var taskLogicTypeLabel = document.createElement("label"); + taskLogicTypeLI.appendChild(taskLogicTypeLabel); + taskLogicTypeLabel.setAttribute("for", "editTaskFormTaskLogicTypeInput"); + taskLogicTypeLabel.innerHTML = "Task Logic Type / Flavour: "; + var taskLogicTypeInput = document.createElement("input"); + taskLogicTypeLI.appendChild(taskLogicTypeInput); + taskLogicTypeInput.setAttribute("id", "editTaskFormTaskLogicTypeInput"); + taskLogicTypeInput.setAttribute("type", "text"); + taskLogicTypeInput.setAttribute("name", "editTaskFormTaskLogicTypeInput"); + taskLogicTypeInput.setAttribute("class", "field-taskLogicType ebInput"); + taskLogicTypeInput.setAttribute("placeholder", "MVEL"); + if (task && task.taskLogic && task.taskLogic.logicFlavour) { + taskLogicTypeInput.value = task.taskLogic.logicFlavour; + } + if (createEditOrView != "CREATE" && createEditOrView != "EDIT") { + taskLogicTypeInput.readOnly = true; + } + + // parameters + var paramsLI = document.createElement("li"); + formul.appendChild(paramsLI); + var paramsLabel = document.createElement("label"); + paramsLI.appendChild(paramsLabel); + paramsLabel.setAttribute("for", "editTaskFormParamsTable"); + paramsLabel.innerHTML = "Task Parameters: "; + var paramstable = document.createElement("table"); + paramstable.setAttribute("id", "editTaskFormParamsTable"); + paramstable.setAttribute("name", "editTaskFormParamsTable"); + paramstable.setAttribute("class", "table-taskparam"); + paramsLI.appendChild(paramstable); + var paramstable_head = document.createElement("thead"); + paramstable.appendChild(paramstable_head); + var paramstable_head_tr = document.createElement("tr"); + paramstable_head.appendChild(paramstable_head_tr); + paramstable_head_tr.appendChild(document.createElement("th")); // empty, + // for + // delete + // button + var paramstable_head_th = document.createElement("th"); + paramstable_head_tr.appendChild(paramstable_head_th); + paramstable_head_th.innerHTML = "Task Parameter Name: "; + paramstable_head_th.setAttribute("class", "table-taskparam-heading form-heading"); + paramstable_head_th = document.createElement("th"); + paramstable_head_tr.appendChild(paramstable_head_th); + paramstable_head_th.innerHTML = "Task Parameter Value: "; + paramstable_head_th.setAttribute("class", "table-taskparam-heading form-heading"); + var paramstable_body = document.createElement("tbody"); + paramstable.appendChild(paramstable_body); + // Add the params + if (task && task.taskParameters && task.taskParameters.entry) { + for (var p = 0; p < task.taskParameters.entry.length; p++) { + var paramEntry = task.taskParameters.entry[p]; + var paramName = paramEntry.key; + var paramValue = paramEntry.value.defaultValue; + editTaskForm_addTaskParameter(paramstable_body, (createEditOrView == "VIEW"), paramName, paramValue); + } + } + // add the Task Parameter button + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var paramTR = document.createElement("tr"); + paramTR.setAttribute("class", "field-taskparam-tr.new"); + paramstable_body.appendChild(paramTR); + var paramTD = document.createElement("td"); + paramTD.setAttribute("colspan", "3"); + paramTR.appendChild(paramTD); + var addParamInput = createAddFormButton(); + paramTD.appendChild(addParamInput); + addParamInput.onclick = function() { + editTaskForm_addTaskParameter(paramstable_body, false, null, null); + }; + } + + // Context Albums references + var contextsLI = document.createElement("li"); + formul.appendChild(contextsLI); + var contextsLabel = document.createElement("label"); + contextsLI.appendChild(contextsLabel); + contextsLabel.setAttribute("for", "editTaskFormContextsTable"); + contextsLabel.innerHTML = "Context Albums used in Task Logic: "; + var contextstable = document.createElement("table"); + contextstable.setAttribute("id", "editTaskFormContextsTable"); + contextstable.setAttribute("name", "editTaskFormContextsTable"); + contextstable.setAttribute("class", "table-taskcontext"); + contextsLI.appendChild(contextstable); + var contextstable_head = document.createElement("thead"); + contextstable.appendChild(contextstable_head); + var contextstable_head_tr = document.createElement("tr"); + contextstable_head.appendChild(contextstable_head_tr); + contextstable_head_tr.appendChild(document.createElement("th")); // empty, + // for + // delete + // button + var contextstable_head_th = document.createElement("th"); + contextstable_head_tr.appendChild(contextstable_head_th); + contextstable_head_th.innerHTML = "Context Album: "; + contextstable_head_th.setAttribute("class", "table-taskcontext-heading form-heading"); + var contextstable_body = document.createElement("tbody"); + contextstable.appendChild(contextstable_body); + // Add the contexts + if (task && task.contextAlbumReference && $.isArray(task.contextAlbumReference)) { + for (var p = 0; p < task.contextAlbumReference.length; p++) { + var contextEntry = task.contextAlbumReference[p]; + var contextName = contextEntry.name + ":" + contextEntry.version; + var ce = { + "name" : contextEntry.name, + "version" : contextEntry.version, + "displaytext" : contextName + }; + editTaskForm_addTaskContext(contextstable_body, (createEditOrView == "VIEW"), contextName, ce, + contextAlbums); + } + } + // add the Task Context button + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var contextTR = document.createElement("tr"); + contextTR.setAttribute("class", "field-taskcontext-tr.new"); + contextstable_body.appendChild(contextTR); + var contextTD = document.createElement("td"); + contextTD.setAttribute("colspan", "2"); + contextTR.appendChild(contextTD); + var addContextInput = createAddFormButton(); + contextTD.appendChild(addContextInput); + addContextInput.onclick = function() { + editTaskForm_addTaskContext(contextstable_body, false, null, null, contextAlbums); + }; + } + + // buttons + var inputLI = document.createElement("li"); + formul.appendChild(inputLI); + if (createEditOrView == "CREATE") { + var generateUUIDInput = document.createElement("button"); + inputLI.appendChild(generateUUIDInput); + generateUUIDInput.setAttribute("id", "generateUUID"); + generateUUIDInput.setAttribute("class", "ebBtn ebBtn_large"); + generateUUIDInput.setAttribute("type", "submit"); + generateUUIDInput.setAttribute("value", "Generate UUID"); + generateUUIDInput.onclick = editTaskForm_generateUUIDPressed; + generateUUIDInput.innerHTML = generateUUIDInput.getAttribute("value"); + var inputSpan0 = document.createElement("span"); + inputLI.appendChild(inputSpan0); + inputSpan0.setAttribute("class", "required"); + inputSpan0.innerHTML = " "; + + var generateDescriptionInput = document.createElement("button"); + inputLI.appendChild(generateDescriptionInput); + generateDescriptionInput.setAttribute("id", "generateDescription"); + generateDescriptionInput.setAttribute("class", "ebBtn ebBtn_large"); + generateDescriptionInput.setAttribute("type", "submit"); + generateDescriptionInput.setAttribute("value", "Generate Description"); + generateDescriptionInput.onclick = editTaskForm_generateDescriptionPressed; + generateDescriptionInput.innerHTML = generateDescriptionInput.getAttribute("value"); + var inputSpan1 = document.createElement("span"); + inputLI.appendChild(inputSpan1); + inputSpan1.setAttribute("class", "required"); + inputSpan1.innerHTML = " "; + } + + var cancelInput = document.createElement("button"); + inputLI.appendChild(cancelInput); + cancelInput.setAttribute("id", "cancel"); + cancelInput.setAttribute("class", "ebBtn ebBtn_large"); + cancelInput.setAttribute("type", "submit"); + cancelInput.setAttribute("value", "Cancel"); + cancelInput.onclick = editTaskForm_cancelPressed; + cancelInput.innerHTML = cancelInput.getAttribute("value"); + + if (createEditOrView == "CREATE" || createEditOrView == "EDIT") { + var inputSpan2 = document.createElement("span"); + inputLI.appendChild(inputSpan2); + inputSpan2.setAttribute("class", "required"); + inputSpan2.innerHTML = " "; + var submitInput = document.createElement("button"); + inputLI.appendChild(submitInput); + submitInput.setAttribute("id", "submit"); + submitInput.setAttribute("class", "ebBtn ebBtn_large"); + submitInput.setAttribute("type", "submit"); + submitInput.setAttribute("value", "Submit"); + submitInput.onclick = editTaskForm_submitPressed; + submitInput.innerHTML = submitInput.getAttribute("value"); + } + + formParent.appendChild(contentelement); + scrollToTop(); +} + +function editTaskForm_addTaskInputField(parentTBody, disabled, name, optional, contextSchema, contextSchemas) { + var random_suffix = formUtils_generateUUID(); + + var inputfieldTR = parentTBody.insertRow(parentTBody.rows.length - 1); + inputfieldTR.setAttribute("inputfield_id", random_suffix); + inputfieldTR.setAttribute("class", "field-taskinputfield-tr"); + if (name == null && contextSchema == null && !disabled) { + inputfieldTR.setAttribute("class", "field-taskinputfield-tr.new field-add-new"); + $(inputfieldTR).show("fast"); + } + + var deleteTD = document.createElement("td"); + inputfieldTR.appendChild(deleteTD); + var deleteDiv = document.createElement("div"); + deleteTD.appendChild(deleteDiv); + if (!disabled) { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete"); + deleteDiv.onclick = function(event) { + $(inputfieldTR).hide("fast", function() { + inputfieldTR.parentNode.removeChild(inputfieldTR); + }); + } + } else { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete ebIcon_disabled"); + } + var nameTD = document.createElement("td"); + inputfieldTR.appendChild(nameTD); + var nameInput = document.createElement("input"); + nameTD.appendChild(nameInput); + nameInput.setAttribute("id", "editTaskFormInputFieldName" + "_" + random_suffix); + nameInput.setAttribute("type", "text"); + nameInput.setAttribute("name", "editTaskFormInputFieldName" + "_" + random_suffix); + nameInput.setAttribute("class", "field-taskinputfield-name ebInput ebInput_width_xLong"); + if (name == null && contextSchema == null && !disabled) { + nameInput.setAttribute("class", "field-taskinputfield-name.new ebInput ebInput_width_xLong"); + } + nameInput.setAttribute("placeholder", "Input Field Name"); + if (name) { + nameInput.value = name; + } + nameInput.readOnly = disabled; + + var contextSchemaTD = document.createElement("td"); + inputfieldTR.appendChild(contextSchemaTD); + + var selectDiv = dropdownList("editTaskFormInputFieldContextSchema" + "_" + random_suffix, contextSchemas, + contextSchema, disabled, null) + contextSchemaTD.appendChild(selectDiv); + + var inputOptionalTD = document.createElement("td"); + inputOptionalTD.setAttribute("class", "field-checkbox-center"); + inputfieldTR.appendChild(inputOptionalTD); + var inputOptional = document.createElement("input"); + inputOptional.setAttribute("type", "checkbox"); + inputOptional.setAttribute("id", "editTaskFormInputFieldOptional" + "_" + random_suffix); + inputOptional.setAttribute("name", "editTaskFormInputFieldOptional" + "_" + random_suffix); + inputOptional.setAttribute("class", "field-eventparam-optional"); + if (name == null && contextSchema == null && !disabled) { + inputOptional.setAttribute("class", "field-eventparam-optional.new"); + } + if (optional == true) { + inputOptional.checked = true; + } else { + inputOptional.checked = false; + } + inputOptional.disabled = disabled; + inputOptionalTD.appendChild(inputOptional); +} + +function editTaskForm_addTaskOutputField(parentTBody, disabled, name, optional, contextSchema, contextSchemas) { + var random_suffix = formUtils_generateUUID(); + + var outputfieldTR = parentTBody.insertRow(parentTBody.rows.length - 1); + outputfieldTR.setAttribute("outputfield_id", random_suffix); + outputfieldTR.setAttribute("class", "field-taskoutputfield-tr"); + if (name == null && contextSchema == null && !disabled) { + outputfieldTR.setAttribute("class", "field-taskoutputfield-tr.new field-add-new"); + $(outputfieldTR).show("fast"); + } + + var deleteTD = document.createElement("td"); + outputfieldTR.appendChild(deleteTD); + var deleteDiv = document.createElement("div"); + deleteTD.appendChild(deleteDiv); + if (!disabled) { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete"); + deleteDiv.onclick = function(event) { + $(outputfieldTR).hide("fast", function() { + outputfieldTR.parentNode.removeChild(outputfieldTR); + }); + } + } else { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete ebIcon ebIcon_disabled"); + } + var nameTD = document.createElement("td"); + outputfieldTR.appendChild(nameTD); + var nameInput = document.createElement("input"); + nameTD.appendChild(nameInput); + nameInput.setAttribute("id", "editTaskFormOutputFieldName" + "_" + random_suffix); + nameInput.setAttribute("type", "text"); + nameInput.setAttribute("name", "editTaskFormOutputFieldName" + "_" + random_suffix); + nameInput.setAttribute("class", "field-taskoutputfield-name ebInput ebInput_width_xLong"); + if (name == null && contextSchema == null && !disabled) { + nameInput.setAttribute("class", "field-taskoutputfield-name.new ebInput ebInput_width_xLong"); + } + nameInput.setAttribute("placeholder", "Output Field Name"); + if (name) { + nameInput.value = name; + } + nameInput.readOnly = disabled; + + var contextSchemaTD = document.createElement("td"); + outputfieldTR.appendChild(contextSchemaTD); + + var selectDiv = dropdownList("editTaskFormOutputFieldContextSchema" + "_" + random_suffix, contextSchemas, + contextSchema, disabled, null) + contextSchemaTD.appendChild(selectDiv); + + var outputOptionalTD = document.createElement("td"); + outputOptionalTD.setAttribute("class", "field-checkbox-center"); + outputfieldTR.appendChild(outputOptionalTD); + var outputOptional = document.createElement("input"); + outputOptional.setAttribute("type", "checkbox"); + outputOptional.setAttribute("id", "editTaskFormOutputFieldOptional" + "_" + random_suffix); + outputOptional.setAttribute("name", "editTaskFormOutputFieldOptional" + "_" + random_suffix); + outputOptional.setAttribute("class", "field-eventparam-optional"); + if (name == null && contextSchema == null && !disabled) { + outputOptional.setAttribute("class", "field-eventparam-optional.new"); + } + if (optional == true) { + outputOptional.checked = true; + } else { + outputOptional.checked = false; + } + outputOptional.disabled = disabled; + outputOptionalTD.appendChild(outputOptional); +} + +function editTaskForm_addTaskParameter(parentTBody, disabled, name, value) { + var random_suffix = formUtils_generateUUID(); + + var paramTR = parentTBody.insertRow(parentTBody.rows.length - 1); + paramTR.setAttribute("param_id", random_suffix); + paramTR.setAttribute("class", "field-taskparam-tr"); + if (name == null && value == null && !disabled) { + paramTR.setAttribute("class", "field-taskparam-tr.new field-add-new"); + $(paramTR).show("fast"); + } + + var deleteTD = document.createElement("td"); + paramTR.appendChild(deleteTD); + var deleteDiv = document.createElement("div"); + deleteTD.appendChild(deleteDiv); + if (!disabled) { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete"); + deleteDiv.onclick = function(event) { + $(paramTR).hide("fast", function() { + paramTR.parentNode.removeChild(paramTR); + }); + } + } else { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete ebIcon_disabled"); + } + var nameTD = document.createElement("td"); + paramTR.appendChild(nameTD); + var nameInput = document.createElement("input"); + nameTD.appendChild(nameInput); + nameInput.setAttribute("id", "editTaskFormParamName" + "_" + random_suffix); + nameInput.setAttribute("type", "text"); + nameInput.setAttribute("name", "editTaskFormParamName" + "_" + random_suffix); + nameInput.setAttribute("class", "field-taskparam-name ebInput ebInput_width_xLong"); + if (name == null && value == null && !disabled) { + nameInput.setAttribute("class", "field-taskparam-name.new ebInput ebInput_width_xLong"); + } + nameInput.setAttribute("placeholder", "Task Parameter Name"); + if (name) { + nameInput.value = name; + } + nameInput.readOnly = disabled; + + var valueTD = document.createElement("td"); + paramTR.appendChild(valueTD); + var paramInput = document.createElement("input"); + valueTD.appendChild(paramInput); + paramInput.setAttribute("id", "editTaskFormParamValue" + "_" + random_suffix); + paramInput.setAttribute("type", "text"); + paramInput.setAttribute("name", "editTaskFormParamValue" + "_" + random_suffix); + paramInput.setAttribute("class", "field-taskparam-value ebInput ebInput_width_xLong"); + if (name == null && value == null && !disabled) { + paramInput.setAttribute("class", "field-taskparam-value.new ebInput ebInput_width_xLong"); + } + paramInput.setAttribute("placeholder", "Task Parameter Value"); + if (value) { + paramInput.value = value; + } + paramInput.readOnly = disabled; +} + +function editTaskForm_addTaskContext(parentTBody, disabled, name, albumreference, contextAlbums) { + var random_suffix = formUtils_generateUUID(); + + var contextTR = parentTBody.insertRow(parentTBody.rows.length - 1); + contextTR.setAttribute("context_id", random_suffix); + contextTR.setAttribute("class", "field-taskcontext-tr"); + if (name == null && albumreference == null && !disabled) { + contextTR.setAttribute("class", "field-taskcontext-tr.new field-add-new"); + $(contextTR).show("fast"); + } + + var deleteTD = document.createElement("td"); + contextTR.appendChild(deleteTD); + var deleteDiv = document.createElement("div"); + deleteTD.appendChild(deleteDiv); + if (!disabled) { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete"); + deleteDiv.onclick = function(event) { + $(contextTR).hide("fast", function() { + contextTR.parentNode.removeChild(contextTR); + }); + } + } else { + deleteDiv.setAttribute("class", "ebIcon ebIcon_interactive ebIcon_delete ebIcon_disabled"); + } + var valueTD = document.createElement("td"); + contextTR.appendChild(valueTD); + + var selectDiv = dropdownList("editTaskFormContextValue" + "_" + random_suffix, contextAlbums, albumreference, + disabled, null); + valueTD.appendChild(selectDiv); +} + +function editTaskForm_generateUUIDPressed() { + document.getElementById("editTaskFormUuidInput").value = formUtils_generateUUID(); +} + +function editTaskForm_generateDescriptionPressed() { + document.getElementById("editTaskFormDescriptionTextArea").value = formUtils_generateDescription(document + .getElementById("editTaskFormNameInput").value, document.getElementById("editTaskFormVersionInput").value, + document.getElementById("editTaskFormUuidInput").value); +} + +function editTaskForm_cancelPressed() { + apexUtils_removeElement("editTaskFormDiv"); + taskTab_reset(); +} + +function editTaskForm_submitPressed() { + var createEditOrView = document.getElementById("editTaskForm").getAttribute("createEditOrView"); + if (!createEditOrView || createEditOrView == "" || (createEditOrView != "CREATE" && createEditOrView != "EDIT")) { + console.error("Invalid operation \"" + createEditOrView + + "\" passed to editTaskForm_submitPressed function. Edit failed"); + apexUtils_removeElement("editTaskFormDiv"); + taskTab_reset(); + return; + } + + var name = document.getElementById('editTaskFormNameInput').value; + var version = document.getElementById('editTaskFormVersionInput').value; + + // get the task inputfields + var taskbean_inputfields = null; + var inputfieldstablerows = document.getElementById("editTaskFormInputFieldsTable").rows; + if (inputfieldstablerows && inputfieldstablerows.length > 2) { + taskbean_inputfields = new Object(); + for (var i = 1; i < inputfieldstablerows.length - 1; i++) { + var inputfieldTR = inputfieldstablerows[i]; + if (inputfieldTR && inputfieldTR.getAttribute("inputfield_id")) { + var inputfield_id = inputfieldTR.getAttribute("inputfield_id"); + var inputfieldname = document.getElementById("editTaskFormInputFieldName" + "_" + inputfield_id).value; + var inputfield_optional = document.getElementById("editTaskFormInputFieldOptional" + "_" + + inputfield_id).checked; + var inputfield_dt = document.getElementById("editTaskFormInputFieldContextSchema" + "_" + inputfield_id + + "_dropdownList").selectedOption; + if (taskbean_inputfields[inputfieldname]) { + alert("Task \"" + name + "\" contains more than one Input Field called \"" + inputfieldname + "\""); + return false; + } + if (inputfield_dt == null) { + alert("Task \"" + name + "\" has no selected Context Item Schema for the Input Field called \"" + + inputfieldname + "\""); + return false; + } + var inputfield_dt_name = inputfield_dt.name; + var inputfield_dt_version = inputfield_dt.version; + taskbean_inputfields[inputfieldname] = { + "localName" : inputfieldname, + "name" : inputfield_dt_name, + "version" : inputfield_dt_version, + "optional" : inputfield_optional + }; + } + } + } + // get the task outputfields + var taskbean_outputfields = null; + var outputfieldstablerows = document.getElementById("editTaskFormOutputFieldsTable").rows; + if (outputfieldstablerows && outputfieldstablerows.length > 2) { + taskbean_outputfields = new Object(); + for (var i = 1; i < outputfieldstablerows.length - 1; i++) { + var outputfieldTR = outputfieldstablerows[i]; + if (outputfieldTR && outputfieldTR.getAttribute("outputfield_id")) { + var outputfield_id = outputfieldTR.getAttribute("outputfield_id"); + var outputfieldname = document.getElementById("editTaskFormOutputFieldName" + "_" + outputfield_id).value; + var outputfield_optional = document.getElementById("editTaskFormOutputFieldOptional" + "_" + + outputfield_id).checked; + var outputfield_dt = document.getElementById("editTaskFormOutputFieldContextSchema" + "_" + + outputfield_id + "_dropdownList").selectedOption; + if (taskbean_outputfields[outputfieldname]) { + alert("Task \"" + name + "\" contains more than one Output Field called \"" + outputfieldname + + "\""); + return false; + } + if (outputfield_dt == null) { + alert("Task \"" + name + "\" has no selected Context Item Schema for the Output Field called \"" + + outputfieldname + "\""); + return false; + } + var outputfield_dt_name = outputfield_dt.name; + var outputfield_dt_version = outputfield_dt.version; + taskbean_outputfields[outputfieldname] = { + "localName" : outputfieldname, + "name" : outputfield_dt_name, + "version" : outputfield_dt_version, + "optional" : outputfield_optional + }; + } + } + } + // get the logic fields + var logicfield = document.getElementById("editTaskFormTaskLogicTextArea_textarea").value; + var logictype = document.getElementById("editTaskFormTaskLogicTypeInput").value; + if (logictype == null || logictype == "") { + alert("Task \"" + name + "\" has no Task Logic Type"); + return false; + } + var tasklogic = { + "logic" : logicfield, + "logicFlavour" : logictype + }; + // get the task parameters + var taskbean_parameters = null; + var paramstablerows = document.getElementById("editTaskFormParamsTable").rows; + if (paramstablerows && paramstablerows.length > 2) { + taskbean_parameters = new Object(); + for (var i = 1; i < paramstablerows.length - 1; i++) { + var paramTR = paramstablerows[i]; + if (paramTR && paramTR.getAttribute("param_id")) { + var param_id = paramTR.getAttribute("param_id"); + var paramname = document.getElementById("editTaskFormParamName" + "_" + param_id).value; + var paramvalue = document.getElementById("editTaskFormParamValue" + "_" + param_id).value; + if (taskbean_parameters[paramname]) { + alert("Task \"" + name + "\" contains more than one Task Parameters called \"" + paramname + "\""); + return false; + } + taskbean_parameters[paramname] = { + "parameterName" : paramname, + "defaultValue" : paramvalue + }; + } + } + } + // get the context album references + var taskbean_context = null; + var contextstablerows = document.getElementById("editTaskFormContextsTable").rows; + if (contextstablerows && contextstablerows.length > 2) { + taskbean_context = new Array(); + for (var i = 1; i < contextstablerows.length - 1; i++) { + var contextTR = contextstablerows[i]; + if (contextTR && contextTR.getAttribute("context_id")) { + var context_id = contextTR.getAttribute("context_id"); + var contextalbumvalue = document.getElementById("editTaskFormContextValue" + "_" + context_id + + "_dropdownList").selectedOption; + if (contextalbumvalue == null) { + alert("Task \"" + name + "\" has Context Album reference, but no Context Album is selected"); + return false; + } + var contextalbumname = contextalbumvalue.displaytext; + for (var j = 0; j < taskbean_context.length; j++) { + if (taskbean_context[j] != null && taskbean_context[j].name == contextalbumvalue.name + && taskbean_context[j].version == contextalbumvalue.version) { + alert("Task \"" + name + "\" references Context Album \"" + contextalbumname + + "\" more than once"); + return false; + } + } + taskbean_context.push({ + "name" : contextalbumvalue.name, + "version" : contextalbumvalue.version + }); + } + } + } + + // generate an task bean to json-ify and send in rest request + var taskbean = { + "name" : name, + "version" : version, + "uuid" : document.getElementById('editTaskFormUuidInput').value, + "description" : document.getElementById('editTaskFormDescriptionTextArea').value, + "taskLogic" : tasklogic, + "inputFields" : taskbean_inputfields, + "outputFields" : taskbean_outputfields, + "parameters" : taskbean_parameters, + "contexts" : taskbean_context + } + var jsonString = JSON.stringify(taskbean); + + if (createEditOrView == "CREATE") { + var requestURL = restRootURL + "/Task/Create"; + ajax_post(requestURL, jsonString, function(resultData) { + apexUtils_removeElement("editTaskFormDiv"); + taskTab_reset(); + keyInformationTab_reset() + }); + } else if (createEditOrView == "EDIT") { + var requestURL = restRootURL + "/Task/Update"; + ajax_put(requestURL, jsonString, function(resultData) { + apexUtils_removeElement("editTaskFormDiv"); + taskTab_reset(); + keyInformationTab_reset() + }); + } + +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js new file mode 100644 index 0000000..632882b --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js @@ -0,0 +1,176 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function taskTab_reset() { + taskTab_deactivate(); + taskTab_activate(); +} + +function taskTab_activate() { + taskTab_create(); + + var requestURL = restRootURL + "/Task/Get?name=&version="; + + ajax_get(requestURL, function(data) { + $("#taskTableBody").find("tr:gt(0)").remove(); + + for (var i = 0; i < data.messages.message.length; i++) { + var task = JSON.parse(data.messages.message[i]).apexTask; + + var taskRow_tr = document.createElement("tr"); + var taskid = task.key.name + ":" + task.key.version; + + var taskTableRow = + "" + + task.key.name + ":" + task.key.version + + "" + + "" + + task.taskLogic.logicFlavour + + ""; + + taskTableRow += ""; + for (var f = 0; f < task.inputFields.entry.length; f++) { + var fieldEntry = task.inputFields.entry[f]; + + taskTableRow += + "" + + ""; + } + taskTableRow += "
Field NameField Type/SchemaOptional
" + + fieldEntry.key + + "" + + fieldEntry.value.fieldSchemaKey.name + ":" + fieldEntry.value.fieldSchemaKey.version + + "" + + fieldEntry.value.optional + + "
"; + + taskTableRow += ""; + for (var f = 0; f < task.outputFields.entry.length; f++) { + var fieldEntry = task.outputFields.entry[f]; + + taskTableRow += + "" + + ""; + } + taskTableRow += "
Field NameField Type/SchemaOptional
" + + fieldEntry.key + + "" + + fieldEntry.value.fieldSchemaKey.name + ":" + fieldEntry.value.fieldSchemaKey.version + + "" + + fieldEntry.value.optional + + "
"; + + taskTableRow += ""; + for (var p = 0; p < task.taskParameters.entry.length; p++) { + var parameterEntry = task.taskParameters.entry[p]; + + taskTableRow += + "" + + ""; + } + taskTableRow += "
Parameter NameDefault Value
" + + parameterEntry.key + + "" + + parameterEntry.value.defaultValue + + "
"; + + taskTableRow += ""; + for (var c = 0; c < task.contextAlbumReference.length; c++) { + var contextAlbumReference = task.contextAlbumReference[c]; + + taskTableRow += + ""; + } + taskTableRow += "
" + + contextAlbumReference.name + ":" + contextAlbumReference.version + + "
"; + + taskRow_tr.innerHTML = taskTableRow; + taskRow_tr.addEventListener('contextmenu', rightClickMenu_scopePreserver("taskTabContent", "Task", task.key.name, task.key.version)); + + $("#taskTableBody").append(taskRow_tr); + + } + }); +} + +function taskTab_deactivate() { + apexUtils_removeElement("taskTabContent"); +} + +function taskTab_create() { + var taskTab = document.getElementById("tasksTab"); + + var taskTabContent = document.getElementById("taskTabContent"); + if (taskTabContent != null) { + return + } + + var taskTabContent = document.createElement("taskTabContent"); + taskTab.appendChild(taskTabContent); + taskTabContent.setAttribute("id", "taskTabContent"); + taskTabContent.addEventListener('contextmenu', rightClickMenu_scopePreserver("taskTabContent", "Task", null, null)); + + var taskTable = createTable("taskTable"); + taskTabContent.appendChild(taskTable); + + var taskTableHeader = document.createElement("thead"); + taskTable.appendChild(taskTableHeader); + taskTableHeader.setAttribute("id", "taskTableHeader"); + + var taskTableHeaderRow = document.createElement("tr"); + taskTableHeader.appendChild(taskTableHeaderRow); + taskTableHeaderRow.setAttribute("id", "taskTableHeaderRow"); + + var taskTableKeyHeader = document.createElement("th"); + taskTableHeaderRow.appendChild(taskTableKeyHeader); + taskTableKeyHeader.setAttribute("id", "taskTableKeyHeader"); + taskTableKeyHeader.appendChild(document.createTextNode("Task")); + + var taskTableLogicFlavourHeader = document.createElement("th"); + taskTableHeaderRow.appendChild(taskTableLogicFlavourHeader); + taskTableLogicFlavourHeader.setAttribute("id", "taskTableLogicFlavourHeader"); + taskTableLogicFlavourHeader.appendChild(document.createTextNode("Logic Flavour")); + + var taskTableInputFieldHeader = document.createElement("th"); + taskTableHeaderRow.appendChild(taskTableInputFieldHeader); + taskTableInputFieldHeader.setAttribute("id", "taskTableInputFieldHeader"); + taskTableInputFieldHeader.appendChild(document.createTextNode("Input Fields")); + + var taskTableOutputFieldHeader = document.createElement("th"); + taskTableHeaderRow.appendChild(taskTableOutputFieldHeader); + taskTableOutputFieldHeader.setAttribute("id", "taskTableOutputFieldHeader"); + taskTableOutputFieldHeader.appendChild(document.createTextNode("Output Fields")); + + var taskTableParameterHeader = document.createElement("th"); + taskTableHeaderRow.appendChild(taskTableParameterHeader); + taskTableParameterHeader.setAttribute("id", "taskTableParameterHeader"); + taskTableParameterHeader.appendChild(document.createTextNode("Parameters")); + + var taskTableContextReferenceHeader = document.createElement("th"); + taskTableHeaderRow.appendChild(taskTableContextReferenceHeader); + taskTableContextReferenceHeader.setAttribute("id", "taskTableContextReferenceHeader"); + taskTableContextReferenceHeader.appendChild(document.createTextNode("Context Album References")); + + var taskTableBody = document.createElement("tbody"); + taskTable.appendChild(taskTableBody); + taskTable.setAttribute("id", "taskTableBody"); +} \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexUtils.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexUtils.js new file mode 100644 index 0000000..33abdeb --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexUtils.js @@ -0,0 +1,127 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function apexUtils_areYouSure(message) { + return confirm(message); +} + +function apexUtils_emptyElement(elementname) { + var element = document.getElementById(elementname); + if (element != null) { + while (element.firstChild) { + element.removeChild(element.firstChild); + } + } +} + +function apexUtils_removeElement(elementname) { + var element = document.getElementById(elementname); + if (element != null) { + element.parentNode.removeChild(element); + } +} + +var _entityMap = { + '&' : '&', + '<' : '<', + '>' : '>', + '"' : '"', + "'" : ''', + '/' : '/', + '`' : '`', + '=' : '=', + '\n' : '
', + '\t' : '    ', + ' ' : ' ', +}; + +function apexUtils_escapeHtml(string) { + return String(string).replace(/[&<>"'\/\t\n ]/g, function(s) { + return _entityMap[s]; + }); +} + +function apexUtils_deleteTableRow(tablename, tablerowindex) { + document.getElementById(tablename).deleteRow(tablerowindex) +} + +function createAddFormButton(_text) { + var text = _text ? _text : "Add"; + var element = document.createElement("div"); + element.setAttribute("class", "add-field") + var addIcon = document.createElement("i"); + addIcon.setAttribute("class", "form-add-icon ebIcon ebIcon_add"); + var addText = document.createElement("span"); + addText.setAttribute("class", "form-add-text"); + addText.innerHTML = text; + element.appendChild(addIcon); + element.appendChild(addText); + return element; +} + +function createEditArea(id, options, callback) { + options = options ? options : {}; + var syntax = options.syntax ? options.syntax : "java"; + var start_highlight = options.start_highlight ? options.start_highlight : true; + var min_height = options.min_height ? options.min_height : 400; + var font_size = options.font_size ? options.font_size : 12 + var is_editable = options.hasOwnProperty("is_editable") ? options.is_editable : true; + var toolbar = options.toolbar ? options.toolbar : "select_font, |, highlight, reset_highlight"; + + setTimeout(function() { + editAreaLoader.init({ + id : id, + is_editable : is_editable, + syntax : syntax, + start_highlight : start_highlight, + min_height : min_height, + font_size : font_size, + toolbar : toolbar, + change_callback : "onEditAreaChange" + }); + }, 100); + +} + +function onEditAreaChange(id) { + $("#" + id).val(editAreaLoader.getValue(id)); +} + +function isFirefox() { + return (navigator.userAgent.indexOf("Firefox") != -1); +} + +function scrollToTop(element) { + element = element ? element : "html, body"; + $(element).animate({ + scrollTop : 0 + }, 'fast'); +} + +function getHomepageURL() { + var homepageURL = location.protocol + + "//" + + window.location.hostname + + (location.port ? ':' + location.port : '') + + (location.pathname.endsWith("/editor/") ? location.pathname.substring(0, location.pathname + .indexOf("editor/")) : location.pathname); + location.href = homepageURL; +} \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/contextMenu.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/contextMenu.js new file mode 100644 index 0000000..925a522 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/contextMenu.js @@ -0,0 +1,199 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +//hide the context menu, if it's shown, anytime the user clicks anywhere. +$(document).on("click", function(event) { + if (document.getElementById("rightClickMenu")) + document.getElementById("rightClickMenu").className = "ebContextMenu-body_visible_false"; +}); + +// Hack: need to maintain each passed parameter in a way it can be referenced by +// the onContextMenu handler function for +// each iteration inside a loop, after the passed parameter goes out of scope +// and changes. +// see +// http://stackoverflow.com/questions/750486/javascript-closure-inside-loops-simple-practical-example +function rightClickMenu_scopePreserver(parent, type, name, version) { + return function(clickevent) { + rightClickMenu(clickevent, parent, type, name, version); + } +} + +// Context menu when user right-clicks inside one of the display tabs +function rightClickMenu(event, parent, type, name, version) { + var rclickdiv = document.getElementById('rightClickMenu'); + if (rclickdiv == null) { + rclickdiv = document.createElement("div"); + document.body.appendChild(rclickdiv); + } + // clear the div + apexUtils_emptyElement('rightClickMenu'); + rclickdiv.setAttribute("id", "rightClickMenu"); + rclickdiv.setAttribute("title", type + " menu"); + rclickdiv.addEventListener("contextmenu", function(e) { + e.preventDefault(); + }, false); + + var ul = document.createElement("div"); + ul.setAttribute("class", "ebComponentList") + rclickdiv.appendChild(ul); + + var li1 = document.createElement("div"); + li1.setAttribute("class", "ebComponentList-item") + li1.onclick = function() { + return rightClickMenuCreate(parent, type); + }; + li1.innerHTML = "Create new " + type + ""; + if (type.toUpperCase() == "KEYINFORMATION") { + li1.setAttribute("class", "ebComponentList-item ebComponentList-item_disabled"); + } + ul.appendChild(li1); + + if (name) { + var value = name + ":" + version; + + var li4 = document.createElement("div"); + li4.setAttribute("class", "ebComponentList-item") + li4.onclick = function() { + return rightClickMenuView(parent, type, name, version); + }; + li4.innerHTML = "View " + type + " " + value + ""; + ul.appendChild(li4); + + var li2 = document.createElement("div"); + li2.setAttribute("class", "ebComponentList-item") + li2.onclick = function() { + return rightClickMenuEdit(parent, type, name, version); + }; + li2.innerHTML = "Edit " + type + " " + value + ""; + ul.appendChild(li2); + + var li3 = document.createElement("div"); + li3.setAttribute("class", "ebComponentList-item") + li3.onclick = function() { + return rightClickMenuDelete(parent, type, name, version); + }; + li3.innerHTML = "Delete " + type + " " + value + ""; + ul.appendChild(li3); + if (type.toUpperCase() == "KEYINFORMATION") { + li3.setAttribute("class", "ebComponentList-item ebComponentList-item_disabled"); + } + } + + // rclickdiv.setAttribute("class", "contextmenu_show"); ewatkmi: swapped + // with ebContextMenu + rclickdiv.setAttribute("class", + "ebContextMenu-body ebContextMenu-body_corner_default ebContextMenu-body_visible_true"); + rclickdiv.style.position = "absolute"; + rclickdiv.style.top = mouseY(event); + rclickdiv.style.left = mouseX(event); + + // prevent event bubbling up to parent elements for their on-click + event.stopPropagation(); + // prevent default context menu + event.returnValue = false; + event.preventDefault(); + return false; +} +function rightClickMenuCreate(parent, type) { + document.getElementById("rightClickMenu").className = "ebContextMenu-body_visible_false"; + if (type.toUpperCase() == "CONTEXTSCHEMA") { + editContextSchemaForm_createContextSchema(parent); + } else if (type.toUpperCase() == "EVENT") { + editEventForm_createEvent(parent); + } else if (type.toUpperCase() == "TASK") { + editTaskForm_createTask(parent); + } else if (type.toUpperCase() == "POLICY") { + editPolicyForm_createPolicy(parent); + } else if (type.toUpperCase() == "CONTEXTALBUM") { + editContextAlbumForm_createContextAlbum(parent); + } else { + alert("So you want to create a new " + type); + } +} +function rightClickMenuView(parent, type, value_name, value_version) { + document.getElementById("rightClickMenu").className = "ebContextMenu-body_visible_false"; + if (type.toUpperCase() == "CONTEXTSCHEMA") { + editContextSchemaForm_viewContextSchema(parent, value_name, value_version); + } else if (type.toUpperCase() == "EVENT") { + editEventForm_viewEvent(parent, value_name, value_version); + } else if (type.toUpperCase() == "TASK") { + editTaskForm_viewTask(parent, value_name, value_version); + } else if (type.toUpperCase() == "POLICY") { + editPolicyForm_viewPolicy(parent, value_name, value_version); + } else if (type.toUpperCase() == "CONTEXTALBUM") { + editContextAlbumForm_viewContextAlbum(parent, value_name, value_version); + } else { + alert("So you want to view " + type + " " + value_name + ":" + value_version); + } +} +function rightClickMenuEdit(parent, type, value_name, value_version) { + document.getElementById("rightClickMenu").className = "ebContextMenu-body_visible_false"; + if (type.toUpperCase() == "CONTEXTSCHEMA") { + editContextSchemaForm_editContextSchema(parent, value_name, value_version); + } else if (type.toUpperCase() == "EVENT") { + editEventForm_editEvent(parent, value_name, value_version); + } else if (type.toUpperCase() == "TASK") { + editTaskForm_editTask(parent, value_name, value_version); + } else if (type.toUpperCase() == "POLICY") { + editPolicyForm_editPolicy(parent, value_name, value_version); + } else if (type.toUpperCase() == "CONTEXTALBUM") { + editContextAlbumForm_editContextAlbum(parent, value_name, value_version); + } else { + alert("So you want to edit " + type + " " + value_name + ":" + value_version); + } +} +function rightClickMenuDelete(parent, type, value_name, value_version) { + document.getElementById("rightClickMenu").className = "ebContextMenu-body_visible_false"; + if (type.toUpperCase() == "CONTEXTSCHEMA") { + editContextSchemaForm_deleteContextSchema(parent, value_name, value_version); + } else if (type.toUpperCase() == "EVENT") { + editEventForm_deleteEvent(parent, value_name, value_version); + } else if (type.toUpperCase() == "TASK") { + editTaskForm_deleteTask(parent, value_name, value_version); + } else if (type.toUpperCase() == "POLICY") { + editPolicyForm_deletePolicy(parent, value_name, value_version); + } else if (type.toUpperCase() == "CONTEXTALBUM") { + editContextAlbumForm_deleteContextAlbum(parent, value_name, value_version); + } else { + alert("So you want to delete " + type + " " + value_name + ":" + value_version); + } +} +function mouseX(evt) { + if (evt.pageX) { + return evt.pageX; + } else if (evt.clientX) { + return evt.clientX + + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); + } else { + return null; + } +} +function mouseY(evt) { + if (evt.pageY) { + return evt.pageY; + } else if (evt.clientY) { + return evt.clientY + + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); + } else { + return null; + } +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js new file mode 100644 index 0000000..a64b823 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js @@ -0,0 +1,201 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +function dropdownList_option_select_scopePreserver(optionDiv, selectedOption, onselect) { + return function(event) { + dropdownList_option_select(optionDiv, selectedOption, onselect); + } +} +function dropdownList_filter_scopePreserver(optionDiv, optionUl) { + return function(event) { + dropdownList_filter(optionDiv, optionUl); + } +} +function dropdownList_option_select(divname, selectedOption, onselect) { + document.getElementById(divname + "_display").innerHTML = selectedOption.displaytext; + document.getElementById(divname)["selectedOption"] = selectedOption; + dropdownList_display_hide(divname); + if (onselect) { + onselect(selectedOption); + } +} +function dropdownList_display_click(divname, options, selected, disabled, getoptions) { + if (!document.getElementById(divname + "_options").classList.contains("dropdownList_show")) { + if (getoptions != null) { + var new_options = getoptions(); + dropdownList_ChangeOptions(document.getElementById(divname), new_options, selected, disabled, getoptions); + } + document.getElementById(divname + "_options").classList + .add("dropdownList_show", "dropdownList_display_clicked"); + } else { + document.getElementById(divname + "_options").classList.remove("dropdownList_show", + "dropdownList_display_clicked"); + } +} +function dropdownList_display_hide(optionDiv) { + document.getElementById(optionDiv + "_options").classList.remove("dropdownList_show"); +} +function dropdownList_filter(optionDiv, optionUl) { + var input, filter, ul; + var input = document.getElementById(optionDiv + "_search"); + var filter = input.value.toUpperCase(); + var ul = document.getElementById(optionDiv + "_options_list_ul"); + var lis = ul.querySelectorAll("#" + ul.id + " > li"); // get li direct + // child elements + for (var i = 0; i < lis.length; i++) { + if (lis[i].innerHTML.toUpperCase().indexOf(filter) > -1) { + lis[i].style.display = ""; + } else { + lis[i].style.display = "none"; + } + } +} + +/* + * Create a dropdown list, with a search function. + * + * Each dropdownList must have a unique "id_prefix" value as a unique identifier + * prefix "options" is an array of objects for options, where each object has a + * field called name. options[i].displaytext is a displayed text for the option + * "selected" is one of the options contained in list in the "options" + * parameter. "selected" must contain at least one field: selected.displaytext, + * where the value of selected.displaytext should be the same as + * options[i].displaytext for one of the values in options. "disabled" is a + * boolean, whether the drop down is enabled or disabled "onselect" is a + * function that is called when an option is selected, with a parameter that is + * the selected option from the passed "options" "getoptions" is a function that + * is called to dynamically retrieve options. It is called when the drop-down + * list is checked. If this is set the "options" parameter is ignored. + * + * Returns a DIV representing the dropdown list. The returned DIV will have a + * new field "selectedOption" containing one of the options in the "options" + * array, or null if no option is selected/ The returned DIV will have an id + * with value "id_prefix+'_dropdownList'", which should be unique. + */ +function dropdownList(id_prefix, options, selected, disabled, onselect, getoptions) { + var retdiv = document.createElement("div"); + var divname = id_prefix + "_dropdownList"; + retdiv.setAttribute("id", divname); + retdiv.setAttribute("class", "dropdownList"); + retdiv["_isDropDownList"] = true; + retdiv["_dropDownList_listener"] = onselect; + return dropdownList_ChangeOptions(retdiv, options, selected, disabled, getoptions); +} + +function dropdownList_ChangeOptions(dropdownListDIV, options, selected, disabled, getoptions) { + var retdiv = dropdownListDIV; + var divname = retdiv.getAttribute("id"); + if (!retdiv["_isDropDownList"]) { + console.error("Cannot provision dropdown list " + divname + " DIV because it is not a dropdown list"); + return null; + } + if (options == null && getoptions == null) { + console.error("Cannot provision dropdown list " + divname + + " DIV because it has no options and no function to get options"); + return null; + } + if (disabled && !selected) { + console.warn("Provisioning dropdown list " + divname + " that is disabled, but there is no value selected!") + } + var subdivs = retdiv.querySelectorAll("#" + divname + " > div, button"); // get + // direct + // children + // or + // retdiv + // that + // are + // divs + for (var d = 0; d < subdivs.length; d++) { + retdiv.removeChild(subdivs[d]); + } + var onselect = null; + if (retdiv["_dropDownList_listener"]) { + onselect = retdiv["_dropDownList_listener"]; + } + var display = document.createElement("div"); + retdiv.appendChild(display); + display.setAttribute("id", divname + "_display"); + retdiv["selectedOption"] = null; + + var button = document.createElement("button"); + button.setAttribute("class", "ebCombobox-helper"); + var iconHolder = document.createElement("span"); + iconHolder.setAttribute("class", "ebCombobox-iconHolder"); + var icon = document.createElement("i"); + var iconStyle = "ebIcon ebIcon_small ebIcon_downArrow_10px eb_noVertAlign"; + if (disabled) { + iconStyle += " ebIcon_disabled"; + } + icon.setAttribute("class", iconStyle); + iconHolder.appendChild(icon); + button.appendChild(iconHolder); + retdiv.appendChild(button); + + if (disabled) { + display.setAttribute("class", "dropdownList_display_disabled ebInput_width_xLong"); + } else { + display.setAttribute("class", "dropdownList_display ebInput_width_xLong"); + var onClickFunction = function(event) { + dropdownList_display_click(divname, options, selected, disabled, getoptions); + }; + display.onclick = onClickFunction; + button.onclick = onClickFunction; + } + var optionsDIV = document.createElement("div"); + retdiv.appendChild(optionsDIV); + optionsDIV.setAttribute("id", divname + "_options"); + optionsDIV.setAttribute("class", "dropdownList_options"); + var optionsSearch = document.createElement("input"); + optionsDIV.appendChild(optionsSearch); + optionsSearch.setAttribute("id", divname + "_search"); + optionsSearch.setAttribute("type", "input"); + optionsSearch.setAttribute("placeholder", "Search.."); + optionsSearch.setAttribute("class", "ebInput ebInput_width_full"); + optionsSearch.onkeyup = dropdownList_filter_scopePreserver(divname, divname + "_options_list"); + var optionsUL = document.createElement("ul"); + optionsUL.setAttribute("class", "dropdownList_options_body"); + optionsSearch.setAttribute("id", divname + "_search"); + optionsDIV.appendChild(optionsUL); + optionsUL.setAttribute("id", divname + "_options_list_ul"); + if (options) { + for (var i = 0; i < options.length; i++) { + var option = document.createElement("li"); + optionsUL.appendChild(option); + option.onclick = dropdownList_option_select_scopePreserver(divname, options[i], onselect); + option.innerHTML = options[i].displaytext; + if (selected && selected.displaytext && selected.displaytext == options[i].displaytext) { + retdiv["selectedOption"] = options[i]; + } + } + } else if (getoptions != null && selected != null) { + retdiv["selectedOption"] = selected; + } + + if (retdiv["selectedOption"] != null) { + display.innerHTML = retdiv["selectedOption"].displaytext; + display.title = display.innerHTML; + } else if (retdiv["selectedOption"] == null && !disabled) { + display.innerHTML = "Select an Option"; + } else if (retdiv["selectedOption"] == null && disabled) { + display.innerHTML = "No Option Selected"; + } + return retdiv; +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/edit_area_full.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/edit_area_full.js new file mode 100644 index 0000000..3521d83 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/edit_area_full.js @@ -0,0 +1,1235 @@ + function EAL() { + var t = this; + t.version = "0.8.2"; + date = new Date(); + t.start_time = date.getTime(); + t.win = "loading"; + t.error = false; + t.baseURL = ""; + t.template = ""; + t.lang = {}; + t.load_syntax = {}; + t.syntax = {}; + t.loadedFiles = []; + t.waiting_loading = {}; + t.scripts_to_load = []; + t.sub_scripts_to_load = []; + t.syntax_display_name = { + 'basic': 'Basic', + 'brainfuck': 'Brainfuck', + 'c': 'C', + 'coldfusion': 'Coldfusion', + 'cpp': 'CPP', + 'css': 'CSS', + 'html': 'HTML', + 'java': 'Java', + 'js': 'Javascript', + 'pas': 'Pascal', + 'perl': 'Perl', + 'php': 'Php', + 'python': 'Python', + 'robotstxt': 'Robots txt', + 'ruby': 'Ruby', + 'sql': 'SQL', + 'tsql': 'T-SQL', + 'vb': 'Visual Basic', + 'xml': 'XML' + }; + t.resize = []; + t.hidden = {}; + t.default_settings = { + debug: false, + smooth_selection: true, + font_size: "10", + font_family: "monospace", + start_highlight: false, + toolbar: "search,go_to_line,fullscreen,|,undo,redo,|,select_font,|,change_smooth_selection,highlight,reset_highlight,word_wrap,|,help", + begin_toolbar: "", + end_toolbar: "", + is_multi_files: false, + allow_resize: "both", + show_line_colors: false, + min_width: 400, + min_height: 125, + replace_tab_by_spaces: false, + allow_toggle: true, + language: "en", + syntax: "", + syntax_selection_allow: "basic,brainfuck,c,coldfusion,cpp,css,html,java,js,pas,perl,php,python,ruby,robotstxt,sql,tsql,vb,xml", + display: "onload", + max_undo: 30, + browsers: "known", + plugins: "", + gecko_spellcheck: false, + fullscreen: false, + is_editable: true, + cursor_position: "begin", + word_wrap: false, + autocompletion: false, + load_callback: "", + save_callback: "", + change_callback: "", + submit_callback: "", + EA_init_callback: "", + EA_delete_callback: "", + EA_load_callback: "", + EA_unload_callback: "", + EA_toggle_on_callback: "", + EA_toggle_off_callback: "", + EA_file_switch_on_callback: "", + EA_file_switch_off_callback: "", + EA_file_close_callback: "" + }; + t.advanced_buttons = [ + ['new_document', 'newdocument.gif', 'new_document', false], + ['search', 'search.gif', 'show_search', false], + ['go_to_line', 'go_to_line.gif', 'go_to_line', false], + ['undo', 'undo.gif', 'undo', true], + ['redo', 'redo.gif', 'redo', true], + ['change_smooth_selection', 'smooth_selection.gif', 'change_smooth_selection_mode', true], + ['reset_highlight', 'reset_highlight.gif', 'resync_highlight', true], + ['highlight', 'highlight.gif', 'change_highlight', true], + ['help', 'help.gif', 'show_help', false], + ['save', 'save.gif', 'save', false], + ['load', 'load.gif', 'load', false], + ['fullscreen', 'fullscreen.gif', 'toggle_full_screen', false], + ['word_wrap', 'word_wrap.gif', 'toggle_word_wrap', true], + ['autocompletion', 'autocompletion.gif', 'toggle_autocompletion', true] + ]; + t.set_browser_infos(t); + if (t.isIE >= 6 || t.isGecko || (t.isWebKit && !t.isSafari < 3) || t.isOpera >= 9 || t.isCamino) t.isValidBrowser = true; + else t.isValidBrowser = false; + t.set_base_url(); + for (var i = 0; i < t.scripts_to_load.length; i++) { + setTimeout("eAL.load_script('" + t.baseURL + t.scripts_to_load[i] + ".js');", 1); + t.waiting_loading[t.scripts_to_load[i] + ".js"] = false; + } + t.add_event(window, "load", EAL.prototype.window_loaded); + }; + EAL.prototype = { + has_error: function() { + this.error = true; + for (var i in EAL.prototype) { + EAL.prototype[i] = function() {}; + } + }, + set_browser_infos: function(o) { + ua = navigator.userAgent; + o.isWebKit = /WebKit/.test(ua); + o.isGecko = !o.isWebKit && /Gecko/.test(ua); + o.isMac = /Mac/.test(ua); + o.isIE = (navigator.appName == "Microsoft Internet Explorer"); + if (o.isIE) { + o.isIE = ua.replace(/^.*?MSIE\s+([0-9\.]+).*$/, "$1"); + if (o.isIE < 6) o.has_error(); + } + if (o.isOpera = (ua.indexOf('Opera') != -1)) { + o.isOpera = ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i, "$1"); + if (o.isOpera < 9) o.has_error(); + o.isIE = false; + } + if (o.isFirefox = (ua.indexOf('Firefox') != -1)) o.isFirefox = ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i, "$1"); + if (ua.indexOf('Iceweasel') != -1) o.isFirefox = ua.replace(/^.*?Iceweasel.*?([0-9\.]+).*$/i, "$1"); + if (ua.indexOf('GranParadiso') != -1) o.isFirefox = ua.replace(/^.*?GranParadiso.*?([0-9\.]+).*$/i, "$1"); + if (ua.indexOf('BonEcho') != -1) o.isFirefox = ua.replace(/^.*?BonEcho.*?([0-9\.]+).*$/i, "$1"); + if (ua.indexOf('SeaMonkey') != -1) o.isFirefox = (ua.replace(/^.*?SeaMonkey.*?([0-9\.]+).*$/i, "$1")) + 1; + if (o.isCamino = (ua.indexOf('Camino') != -1)) o.isCamino = ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i, "$1"); + if (o.isSafari = (ua.indexOf('Safari') != -1)) o.isSafari = ua.replace(/^.*?Version\/([0-9]+\.[0-9]+).*$/i, "$1"); + if (o.isChrome = (ua.indexOf('Chrome') != -1)) { + o.isChrome = ua.replace(/^.*?Chrome.*?([0-9\.]+).*$/i, "$1"); + o.isSafari = false; + } + }, + window_loaded: function() { + eAL.win = "loaded"; + if (document.forms) { + for (var i = 0; i < document.forms.length; i++) { + var form = document.forms[i]; + form.edit_area_replaced_submit = null; + try { + form.edit_area_replaced_submit = form.onsubmit; + form.onsubmit = ""; + } catch (e) {} + eAL.add_event(form, "submit", EAL.prototype.submit); + eAL.add_event(form, "reset", EAL.prototype.reset); + } + } + eAL.add_event(window, "unload", function() { + for (var i in eAs) { + eAL.delete_instance(i); + } + }); + }, + init_ie_textarea: function(id) { + var a = document.getElementById(id); + try { + if (a && typeof(a.focused) == "undefined") { + a.focus(); + a.focused = true; + a.selectionStart = a.selectionEnd = 0; + get_IE_selection(a); + eAL.add_event(a, "focus", IE_textarea_focus); + eAL.add_event(a, "blur", IE_textarea_blur); + } + } catch (ex) {} + }, + init: function(settings) { + var t = this, + s = settings, + i; + if (!s["id"]) t.has_error(); + if (t.error) return; + if (eAs[s["id"]]) t.delete_instance(s["id"]); + for (i in t.default_settings) { + if (typeof(s[i]) == "undefined") s[i] = t.default_settings[i]; + } + if (s["browsers"] == "known" && t.isValidBrowser == false) { + return; + } + if (s["begin_toolbar"].length > 0) s["toolbar"] = s["begin_toolbar"] + "," + s["toolbar"]; + if (s["end_toolbar"].length > 0) s["toolbar"] = s["toolbar"] + "," + s["end_toolbar"]; + s["tab_toolbar"] = s["toolbar"].replace(/ /g, "").split(","); + s["plugins"] = s["plugins"].replace(/ /g, "").split(","); + for (i = 0; i < s["plugins"].length; i++) { + if (s["plugins"][i].length == 0) s["plugins"].splice(i, 1); + } + t.get_template(); + t.load_script(t.baseURL + "langs/" + s["language"] + ".js"); + if (s["syntax"].length > 0) { + s["syntax"] = s["syntax"].toLowerCase(); + t.load_script(t.baseURL + "reg_syntax/" + s["syntax"] + ".js"); + } + eAs[s["id"]] = { + "settings": s + }; + eAs[s["id"]]["displayed"] = false; + eAs[s["id"]]["hidden"] = false; + t.start(s["id"]); + }, + delete_instance: function(id) { + var d = document, + fs = window.frames, + span, iframe; + eAL.execCommand(id, "EA_delete"); + if (fs["frame_" + id] && fs["frame_" + id].editArea) { + if (eAs[id]["displayed"]) eAL.toggle(id, "off"); + fs["frame_" + id].editArea.execCommand("EA_unload"); + } + span = d.getElementById("EditAreaArroundInfos_" + id); + if (span) span.parentNode.removeChild(span); + iframe = d.getElementById("frame_" + id); + if (iframe) { + iframe.parentNode.removeChild(iframe); + try { + delete fs["frame_" + id]; + } catch (e) {} + } + delete eAs[id]; + }, + start: function(id) { + var t = this, + d = document, + f, span, father, next, html = '', + html_toolbar_content = '', + template, content, i; + if (t.win != "loaded") { + setTimeout("eAL.start('" + id + "');", 50); + return; + } + for (i in t.waiting_loading) { + if (t.waiting_loading[i] != "loaded" && typeof(t.waiting_loading[i]) != "function") { + setTimeout("eAL.start('" + id + "');", 50); + return; + } + } + if (!t.lang[eAs[id]["settings"]["language"]] || (eAs[id]["settings"]["syntax"].length > 0 && !t.load_syntax[eAs[id]["settings"]["syntax"]])) { + setTimeout("eAL.start('" + id + "');", 50); + return; + } + if (eAs[id]["settings"]["syntax"].length > 0) t.init_syntax_regexp(); + if (!d.getElementById("EditAreaArroundInfos_" + id) && (eAs[id]["settings"]["debug"] || eAs[id]["settings"]["allow_toggle"])) { + span = d.createElement("span"); + span.id = "EditAreaArroundInfos_" + id; + if (eAs[id]["settings"]["allow_toggle"]) { + checked = (eAs[id]["settings"]["display"] == "onload") ? "checked='checked'" : ""; + html += "
"; + html += ""; + html += "
"; + } + if (eAs[id]["settings"]["debug"]) html += "
"; + html = t.translate(html, eAs[id]["settings"]["language"]); + span.innerHTML = html; + father = d.getElementById(id).parentNode; + next = d.getElementById(id).nextSibling; + if (next == null) father.appendChild(span); + else father.insertBefore(span, next); + } + if (!eAs[id]["initialized"]) { + t.execCommand(id, "EA_init"); + if (eAs[id]["settings"]["display"] == "later") { + eAs[id]["initialized"] = true; + return; + } + } + if (t.isIE) { + t.init_ie_textarea(id); + } + var area = eAs[id]; + for (i = 0; i < area["settings"]["tab_toolbar"].length; i++) { + html_toolbar_content += t.get_control_html(area["settings"]["tab_toolbar"][i], area["settings"]["language"]); + } + html_toolbar_content = t.translate(html_toolbar_content, area["settings"]["language"], "template"); + if (!t.iframe_script) { + t.iframe_script = ""; + for (i = 0; i < t.sub_scripts_to_load.length; i++) t.iframe_script += ''; + } + for (i = 0; i < area["settings"]["plugins"].length; i++) { + if (!t.all_plugins_loaded) t.iframe_script += ''; + t.iframe_script += ''; + } + if (!t.iframe_css) { + t.iframe_css = ""; + } + template = t.template.replace(/\[__BASEURL__\]/g, t.baseURL); + template = template.replace("[__TOOLBAR__]", html_toolbar_content); + template = t.translate(template, area["settings"]["language"], "template"); + template = template.replace("[__CSSRULES__]", t.iframe_css); + template = template.replace("[__JSCODE__]", t.iframe_script); + template = template.replace("[__EA_VERSION__]", t.version); + area.textarea = d.getElementById(area["settings"]["id"]); + eAs[area["settings"]["id"]]["textarea"] = area.textarea; + if (typeof(window.frames["frame_" + area["settings"]["id"]]) != 'undefined') delete window.frames["frame_" + area["settings"]["id"]]; + father = area.textarea.parentNode; + content = d.createElement("iframe"); + content.name = "frame_" + area["settings"]["id"]; + content.id = "frame_" + area["settings"]["id"]; + content.style.borderWidth = "0px"; + setAttribute(content, "frameBorder", "0"); + content.style.overflow = "hidden"; + content.style.display = "none"; + next = area.textarea.nextSibling; + if (next == null) father.appendChild(content); + else father.insertBefore(content, next); + f = window.frames["frame_" + area["settings"]["id"]]; + f.document.open(); + f.eAs = eAs; + f.area_id = area["settings"]["id"]; + f.document.area_id = area["settings"]["id"]; + f.document.write(template); + f.document.close(); + }, + toggle: function(id, toggle_to) { + if (!toggle_to) toggle_to = (eAs[id]["displayed"] == true) ? "off" : "on"; + if (eAs[id]["displayed"] == true && toggle_to == "off") { + this.toggle_off(id); + } else if (eAs[id]["displayed"] == false && toggle_to == "on") { + this.toggle_on(id); + } + return false; + }, + toggle_off: function(id) { + var fs = window.frames, + f, t, parNod, nxtSib, selStart, selEnd, scrollTop, scrollLeft; + if (fs["frame_" + id]) { + f = fs["frame_" + id]; + t = eAs[id]["textarea"]; + if (f.editArea.fullscreen['isFull']) f.editArea.toggle_full_screen(false); + eAs[id]["displayed"] = false; + t.wrap = "off"; + setAttribute(t, "wrap", "off"); + parNod = t.parentNode; + nxtSib = t.nextSibling; + parNod.removeChild(t); + parNod.insertBefore(t, nxtSib); + t.value = f.editArea.textarea.value; + selStart = f.editArea.last_selection["selectionStart"]; + selEnd = f.editArea.last_selection["selectionEnd"]; + scrollTop = f.document.getElementById("result").scrollTop; + scrollLeft = f.document.getElementById("result").scrollLeft; + document.getElementById("frame_" + id).style.display = 'none'; + t.style.display = "inline"; + try { + t.focus(); + } catch (e) {}; + if (this.isIE) { + t.selectionStart = selStart; + t.selectionEnd = selEnd; + t.focused = true; + set_IE_selection(t); + } else { + if (this.isOpera && this.isOpera < 9.6) { + t.setSelectionRange(0, 0); + } + try { + t.setSelectionRange(selStart, selEnd); + } catch (e) {}; + } + t.scrollTop = scrollTop; + t.scrollLeft = scrollLeft; + f.editArea.execCommand("toggle_off"); + } + }, + toggle_on: function(id) { + var fs = window.frames, + f, t, selStart = 0, + selEnd = 0, + scrollTop = 0, + scrollLeft = 0, + curPos, elem; + if (fs["frame_" + id]) { + f = fs["frame_" + id]; + t = eAs[id]["textarea"]; + area = f.editArea; + area.textarea.value = t.value; + curPos = eAs[id]["settings"]["cursor_position"]; + if (t.use_last == true) { + selStart = t.last_selectionStart; + selEnd = t.last_selectionEnd; + scrollTop = t.last_scrollTop; + scrollLeft = t.last_scrollLeft; + t.use_last = false; + } else if (curPos == "auto") { + try { + selStart = t.selectionStart; + selEnd = t.selectionEnd; + scrollTop = t.scrollTop; + scrollLeft = t.scrollLeft; + } catch (ex) {} + } + this.set_editarea_size_from_textarea(id, document.getElementById("frame_" + id)); + t.style.display = "none"; + document.getElementById("frame_" + id).style.display = "inline"; + area.execCommand("focus"); + eAs[id]["displayed"] = true; + area.execCommand("update_size"); + f.document.getElementById("result").scrollTop = scrollTop; + f.document.getElementById("result").scrollLeft = scrollLeft; + area.area_select(selStart, selEnd - selStart); + area.execCommand("toggle_on"); + } else { + elem = document.getElementById(id); + elem.last_selectionStart = elem.selectionStart; + elem.last_selectionEnd = elem.selectionEnd; + elem.last_scrollTop = elem.scrollTop; + elem.last_scrollLeft = elem.scrollLeft; + elem.use_last = true; + eAL.start(id); + } + }, + set_editarea_size_from_textarea: function(id, frame) { + var elem, width, height; + elem = document.getElementById(id); + width = Math.max(eAs[id]["settings"]["min_width"], elem.offsetWidth) + "px"; + height = Math.max(eAs[id]["settings"]["min_height"], elem.offsetHeight) + "px"; + if (elem.style.width.indexOf("%") != -1) width = elem.style.width; + if (elem.style.height.indexOf("%") != -1) height = elem.style.height; + frame.style.width = width; + frame.style.height = height; + }, + set_base_url: function() { + var t = this, + elems, i, docBasePath; + if (!this.baseURL) { + elems = document.getElementsByTagName('script'); + for (i = 0; i < elems.length; i++) { + if (elems[i].src && elems[i].src.match(/edit_area_[^\\\/]*$/i)) { + var src = unescape(elems[i].src); + src = src.substring(0, src.lastIndexOf('/')); + this.baseURL = src; + this.file_name = elems[i].src.substr(elems[i].src.lastIndexOf("/") + 1); + break; + } + } + } + docBasePath = document.location.href; + if (docBasePath.indexOf('?') != -1) docBasePath = docBasePath.substring(0, docBasePath.indexOf('?')); + docBasePath = docBasePath.substring(0, docBasePath.lastIndexOf('/')); + if (t.baseURL.indexOf('://') == -1 && t.baseURL.charAt(0) != '/') { + t.baseURL = docBasePath + "/" + t.baseURL; + } + t.baseURL += "/"; + }, + get_button_html: function(id, img, exec, isFileSpecific, baseURL) { + var cmd, html; + if (!baseURL) baseURL = this.baseURL; + cmd = 'editArea.execCommand(\'' + exec + '\')'; + html = ''; + html += ''; + return html; + }, + get_control_html: function(button_name, lang) { + var t = this, + i, but, html, si; + for (i = 0; i < t.advanced_buttons.length; i++) { + but = t.advanced_buttons[i]; + if (but[0] == button_name) { + return t.get_button_html(but[0], but[1], but[2], but[3]); + } + } + switch (button_name) { + case "*": + case "return": + return "
"; + case "|": + case "separator": + return ''; + case "select_font": + html = ""; + return html; + case "syntax_selection": + html = ""; + return html; + } + return "[" + button_name + "]"; + }, + get_template: function() { + if (this.template == "") { + var xhr_object = null; + if (window.XMLHttpRequest) xhr_object = new XMLHttpRequest(); + else if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); + else { + alert("XMLHTTPRequest not supported. EditArea not loaded"); + return; + } + xhr_object.open("GET", this.baseURL + "template.html", false); + xhr_object.send(null); + if (xhr_object.readyState == 4) this.template = xhr_object.responseText; + else this.has_error(); + } + }, + translate: function(text, lang, mode) { + if (mode == "word") text = eAL.get_word_translation(text, lang); + else if (mode = "template") { + eAL.current_language = lang; + text = text.replace(/\{\$([^\}]+)\}/gm, eAL.translate_template); + } + return text; + }, + translate_template: function() { + return eAL.get_word_translation(EAL.prototype.translate_template.arguments[1], eAL.current_language); + }, + get_word_translation: function(val, lang) { + var i; + for (i in eAL.lang[lang]) { + if (i == val) return eAL.lang[lang][i]; + } + return "_" + val; + }, + load_script: function(url) { + var t = this, + d = document, + script, head; + if (t.loadedFiles[url]) return; + try { + script = d.createElement("script"); + script.type = "text/javascript"; + script.src = url; + script.charset = "UTF-8"; + d.getElementsByTagName("head")[0].appendChild(script); + } catch (e) { + d.write(''); + } + t.loadedFiles[url] = true; + }, + add_event: function(obj, name, handler) { + try { + if (obj.attachEvent) { + obj.attachEvent("on" + name, handler); + } else { + obj.addEventListener(name, handler, false); + } + } catch (e) {} + }, + remove_event: function(obj, name, handler) { + try { + if (obj.detachEvent) obj.detachEvent("on" + name, handler); + else obj.removeEventListener(name, handler, false); + } catch (e) {} + }, + reset: function(e) { + var formObj, is_child, i, x; + formObj = eAL.isIE ? window.event.srcElement : e.target; + if (formObj.tagName != 'FORM') formObj = formObj.form; + for (i in eAs) { + is_child = false; + for (x = 0; x < formObj.elements.length; x++) { + if (formObj.elements[x].id == i) is_child = true; + } + if (window.frames["frame_" + i] && is_child && eAs[i]["displayed"] == true) { + var exec = 'window.frames["frame_' + i + '"].editArea.textarea.value=document.getElementById("' + i + '").value;'; + exec += 'window.frames["frame_' + i + '"].editArea.execCommand("focus");'; + exec += 'window.frames["frame_' + i + '"].editArea.check_line_selection();'; + exec += 'window.frames["frame_' + i + '"].editArea.execCommand("reset");'; + window.setTimeout(exec, 10); + } + } + return; + }, + submit: function(e) { + var formObj, is_child, fs = window.frames, + i, x; + formObj = eAL.isIE ? window.event.srcElement : e.target; + if (formObj.tagName != 'FORM') formObj = formObj.form; + for (i in eAs) { + is_child = false; + for (x = 0; x < formObj.elements.length; x++) { + if (formObj.elements[x].id == i) is_child = true; + } + if (is_child) { + if (fs["frame_" + i] && eAs[i]["displayed"] == true) document.getElementById(i).value = fs["frame_" + i].editArea.textarea.value; + eAL.execCommand(i, "EA_submit"); + } + } + if (typeof(formObj.edit_area_replaced_submit) == "function") { + res = formObj.edit_area_replaced_submit(); + if (res == false) { + if (eAL.isIE) return false; + else e.preventDefault(); + } + } + return; + }, + getValue: function(id) { + if (window.frames["frame_" + id] && eAs[id]["displayed"] == true) { + return window.frames["frame_" + id].editArea.textarea.value; + } else if (elem = document.getElementById(id)) { + return elem.value; + } + return false; + }, + setValue: function(id, new_val) { + var fs = window.frames; + if ((f = fs["frame_" + id]) && eAs[id]["displayed"] == true) { + f.editArea.textarea.value = new_val; + f.editArea.execCommand("focus"); + f.editArea.check_line_selection(false); + f.editArea.execCommand("onchange"); + } else if (elem = document.getElementById(id)) { + elem.value = new_val; + } + }, + getSelectionRange: function(id) { + var sel, eA, fs = window.frames; + sel = { + "start": 0, + "end": 0 + }; + if (fs["frame_" + id] && eAs[id]["displayed"] == true) { + eA = fs["frame_" + id].editArea; + sel["start"] = eA.textarea.selectionStart; + sel["end"] = eA.textarea.selectionEnd; + } else if (elem = document.getElementById(id)) { + sel = getSelectionRange(elem); + } + return sel; + }, + setSelectionRange: function(id, new_start, new_end) { + var fs = window.frames; + if (fs["frame_" + id] && eAs[id]["displayed"] == true) { + fs["frame_" + id].editArea.area_select(new_start, new_end - new_start); + if (!this.isIE) { + fs["frame_" + id].editArea.check_line_selection(false); + fs["frame_" + id].editArea.scroll_to_view(); + } + } else if (elem = document.getElementById(id)) { + setSelectionRange(elem, new_start, new_end); + } + }, + getSelectedText: function(id) { + var sel = this.getSelectionRange(id); + return this.getValue(id).substring(sel["start"], sel["end"]); + }, + setSelectedText: function(id, new_val) { + var fs = window.frames, + d = document, + sel, text, scrollTop, scrollLeft, new_sel_end; + new_val = new_val.replace(/\r/g, ""); + sel = this.getSelectionRange(id); + text = this.getValue(id); + if (fs["frame_" + id] && eAs[id]["displayed"] == true) { + scrollTop = fs["frame_" + id].document.getElementById("result").scrollTop; + scrollLeft = fs["frame_" + id].document.getElementById("result").scrollLeft; + } else { + scrollTop = d.getElementById(id).scrollTop; + scrollLeft = d.getElementById(id).scrollLeft; + } + text = text.substring(0, sel["start"]) + new_val + text.substring(sel["end"]); + this.setValue(id, text); + new_sel_end = sel["start"] + new_val.length; + this.setSelectionRange(id, sel["start"], new_sel_end); + if (new_val != this.getSelectedText(id).replace(/\r/g, "")) { + this.setSelectionRange(id, sel["start"], new_sel_end + new_val.split("\n").length - 1); + } + if (fs["frame_" + id] && eAs[id]["displayed"] == true) { + fs["frame_" + id].document.getElementById("result").scrollTop = scrollTop; + fs["frame_" + id].document.getElementById("result").scrollLeft = scrollLeft; + fs["frame_" + id].editArea.execCommand("onchange"); + } else { + d.getElementById(id).scrollTop = scrollTop; + d.getElementById(id).scrollLeft = scrollLeft; + } + }, + insertTags: function(id, open_tag, close_tag) { + var old_sel, new_sel; + old_sel = this.getSelectionRange(id); + text = open_tag + this.getSelectedText(id) + close_tag; + eAL.setSelectedText(id, text); + new_sel = this.getSelectionRange(id); + if (old_sel["end"] > old_sel["start"]) this.setSelectionRange(id, new_sel["end"], new_sel["end"]); + else this.setSelectionRange(id, old_sel["start"] + open_tag.length, old_sel["start"] + open_tag.length); + }, + hide: function(id) { + var fs = window.frames, + d = document, + t = this, + scrollTop, scrollLeft, span; + if (d.getElementById(id) && !t.hidden[id]) { + t.hidden[id] = {}; + t.hidden[id]["selectionRange"] = t.getSelectionRange(id); + if (d.getElementById(id).style.display != "none") { + t.hidden[id]["scrollTop"] = d.getElementById(id).scrollTop; + t.hidden[id]["scrollLeft"] = d.getElementById(id).scrollLeft; + } + if (fs["frame_" + id]) { + t.hidden[id]["toggle"] = eAs[id]["displayed"]; + if (fs["frame_" + id] && eAs[id]["displayed"] == true) { + scrollTop = fs["frame_" + id].document.getElementById("result").scrollTop; + scrollLeft = fs["frame_" + id].document.getElementById("result").scrollLeft; + } else { + scrollTop = d.getElementById(id).scrollTop; + scrollLeft = d.getElementById(id).scrollLeft; + } + t.hidden[id]["scrollTop"] = scrollTop; + t.hidden[id]["scrollLeft"] = scrollLeft; + if (eAs[id]["displayed"] == true) eAL.toggle_off(id); + } + span = d.getElementById("EditAreaArroundInfos_" + id); + if (span) { + span.style.display = 'none'; + } + d.getElementById(id).style.display = "none"; + } + }, + show: function(id) { + var fs = window.frames, + d = document, + t = this, + span; + if ((elem = d.getElementById(id)) && t.hidden[id]) { + elem.style.display = "inline"; + elem.scrollTop = t.hidden[id]["scrollTop"]; + elem.scrollLeft = t.hidden[id]["scrollLeft"]; + span = d.getElementById("EditAreaArroundInfos_" + id); + if (span) { + span.style.display = 'inline'; + } + if (fs["frame_" + id]) { + elem.style.display = "inline"; + if (t.hidden[id]["toggle"] == true) eAL.toggle_on(id); + scrollTop = t.hidden[id]["scrollTop"]; + scrollLeft = t.hidden[id]["scrollLeft"]; + if (fs["frame_" + id] && eAs[id]["displayed"] == true) { + fs["frame_" + id].document.getElementById("result").scrollTop = scrollTop; + fs["frame_" + id].document.getElementById("result").scrollLeft = scrollLeft; + } else { + elem.scrollTop = scrollTop; + elem.scrollLeft = scrollLeft; + } + } + sel = t.hidden[id]["selectionRange"]; + t.setSelectionRange(id, sel["start"], sel["end"]); + delete t.hidden[id]; + } + }, + getCurrentFile: function(id) { + return this.execCommand(id, 'get_file', this.execCommand(id, 'curr_file')); + }, + getFile: function(id, file_id) { + return this.execCommand(id, 'get_file', file_id); + }, + getAllFiles: function(id) { + return this.execCommand(id, 'get_all_files()'); + }, + openFile: function(id, file_infos) { + return this.execCommand(id, 'open_file', file_infos); + }, + closeFile: function(id, file_id) { + return this.execCommand(id, 'close_file', file_id); + }, + setFileEditedMode: function(id, file_id, to) { + var reg1, reg2; + reg1 = new RegExp('\\\\', 'g'); + reg2 = new RegExp('"', 'g'); + return this.execCommand(id, 'set_file_edited_mode("' + file_id.replace(reg1, '\\\\').replace(reg2, '\\"') + '",' + to + ')'); + }, + execCommand: function(id, cmd, fct_param) { + switch (cmd) { + case "EA_init": + if (eAs[id]['settings']["EA_init_callback"].length > 0) eval(eAs[id]['settings']["EA_init_callback"] + "('" + id + "');"); + break; + case "EA_delete": + if (eAs[id]['settings']["EA_delete_callback"].length > 0) eval(eAs[id]['settings']["EA_delete_callback"] + "('" + id + "');"); + break; + case "EA_submit": + if (eAs[id]['settings']["submit_callback"].length > 0) eval(eAs[id]['settings']["submit_callback"] + "('" + id + "');"); + break; + } + if (window.frames["frame_" + id] && window.frames["frame_" + id].editArea) { + if (fct_param != undefined) return eval('window.frames["frame_' + id + '"].editArea.' + cmd + '(fct_param);'); + else return eval('window.frames["frame_' + id + '"].editArea.' + cmd + ';'); + } + return false; + } + }; + var eAL = new EAL(); + var eAs = {}; + + function getAttribute(elm, aName) { + var aValue, taName, i; + try { + aValue = elm.getAttribute(aName); + } catch (exept) {} + if (!aValue) { + for (i = 0; i < elm.attributes.length; i++) { + taName = elm.attributes[i].name.toLowerCase(); + if (taName == aName) { + aValue = elm.attributes[i].value; + return aValue; + } + } + } + return aValue; + }; + + function setAttribute(elm, attr, val) { + if (attr == "class") { + elm.setAttribute("className", val); + elm.setAttribute("class", val); + } else { + elm.setAttribute(attr, val); + } + }; + + function getChildren(elem, elem_type, elem_attribute, elem_attribute_match, option, depth) { + if (!option) var option = "single"; + if (!depth) var depth = -1; + if (elem) { + var children = elem.childNodes; + var result = null; + var results = []; + for (var x = 0; x < children.length; x++) { + strTagName = new String(children[x].tagName); + children_class = "?"; + if (strTagName != "undefined") { + child_attribute = getAttribute(children[x], elem_attribute); + if ((strTagName.toLowerCase() == elem_type.toLowerCase() || elem_type == "") && (elem_attribute == "" || child_attribute == elem_attribute_match)) { + if (option == "all") { + results.push(children[x]); + } else { + return children[x]; + } + } + if (depth != 0) { + result = getChildren(children[x], elem_type, elem_attribute, elem_attribute_match, option, depth - 1); + if (option == "all") { + if (result.length > 0) { + results = results.concat(result); + } + } else if (result != null) { + return result; + } + } + } + } + if (option == "all") return results; + } + return null; + }; + + function isChildOf(elem, parent) { + if (elem) { + if (elem == parent) return true; + while (elem.parentNode != 'undefined') { + return isChildOf(elem.parentNode, parent); + } + } + return false; + }; + + function getMouseX(e) { + if (e != null && typeof(e.pageX) != "undefined") { + return e.pageX; + } else { + return (e != null ? e.x : event.x) + document.documentElement.scrollLeft; + } + }; + + function getMouseY(e) { + if (e != null && typeof(e.pageY) != "undefined") { + return e.pageY; + } else { + return (e != null ? e.y : event.y) + document.documentElement.scrollTop; + } + }; + + function calculeOffsetLeft(r) { + return calculeOffset(r, "offsetLeft") + }; + + function calculeOffsetTop(r) { + return calculeOffset(r, "offsetTop") + }; + + function calculeOffset(element, attr) { + var offset = 0; + while (element) { + offset += element[attr]; + element = element.offsetParent + } + return offset; + }; + + function get_css_property(elem, prop) { + if (document.defaultView) { + return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop); + } else if (elem.currentStyle) { + var prop = prop.replace(/-\D/gi, function(sMatch) { + return sMatch.charAt(sMatch.length - 1).toUpperCase(); + }); + return elem.currentStyle[prop]; + } else return null; + } + var _mCE; + + function start_move_element(e, id, frame) { + var elem_id = (e.target || e.srcElement).id; + if (id) elem_id = id; + if (!frame) frame = window; + if (frame.event) e = frame.event; + _mCE = frame.document.getElementById(elem_id); + _mCE.frame = frame; + frame.document.onmousemove = move_element; + frame.document.onmouseup = end_move_element; + mouse_x = getMouseX(e); + mouse_y = getMouseY(e); + _mCE.start_pos_x = mouse_x - (_mCE.style.left.replace("px", "") || calculeOffsetLeft(_mCE)); + _mCE.start_pos_y = mouse_y - (_mCE.style.top.replace("px", "") || calculeOffsetTop(_mCE)); + return false; + }; + + function end_move_element(e) { + _mCE.frame.document.onmousemove = ""; + _mCE.frame.document.onmouseup = ""; + _mCE = null; + }; + + function move_element(e) { + var newTop, newLeft, maxLeft; + if (_mCE.frame && _mCE.frame.event) e = _mCE.frame.event; + newTop = getMouseY(e) - _mCE.start_pos_y; + newLeft = getMouseX(e) - _mCE.start_pos_x; + maxLeft = _mCE.frame.document.body.offsetWidth - _mCE.offsetWidth; + max_top = _mCE.frame.document.body.offsetHeight - _mCE.offsetHeight; + newTop = Math.min(Math.max(0, newTop), max_top); + newLeft = Math.min(Math.max(0, newLeft), maxLeft); + _mCE.style.top = newTop + "px"; + _mCE.style.left = newLeft + "px"; + return false; + }; + var nav = eAL.nav; + + function getSelectionRange(textarea) { + return { + "start": textarea.selectionStart, + "end": textarea.selectionEnd + }; + }; + + function setSelectionRange(t, start, end) { + t.focus(); + start = Math.max(0, Math.min(t.value.length, start)); + end = Math.max(start, Math.min(t.value.length, end)); + if (nav.isOpera && nav.isOpera < 9.6) { + t.selectionEnd = 1; + t.selectionStart = 0; + t.selectionEnd = 1; + t.selectionStart = 0; + } + t.selectionStart = start; + t.selectionEnd = end; + if (nav.isIE) set_IE_selection(t); + }; + + function get_IE_selection(t) { + var d = document, + div, range, stored_range, elem, scrollTop, relative_top, line_start, line_nb, range_start, range_end, tab; + if (t && t.focused) { + if (!t.ea_line_height) { + div = d.createElement("div"); + div.style.fontFamily = get_css_property(t, "font-family"); + div.style.fontSize = get_css_property(t, "font-size"); + div.style.visibility = "hidden"; + div.innerHTML = "0"; + d.body.appendChild(div); + t.ea_line_height = div.offsetHeight; + d.body.removeChild(div); + } + range = d.selection.createRange(); + try { + stored_range = range.duplicate(); + stored_range.moveToElementText(t); + stored_range.setEndPoint('EndToEnd', range); + if (stored_range.parentElement() == t) { + elem = t; + scrollTop = 0; + while (elem.parentNode) { + scrollTop += elem.scrollTop; + elem = elem.parentNode; + } + relative_top = range.offsetTop - calculeOffsetTop(t) + scrollTop; + line_start = Math.round((relative_top / t.ea_line_height) + 1); + line_nb = Math.round(range.boundingHeight / t.ea_line_height); + range_start = stored_range.text.length - range.text.length; + tab = t.value.substr(0, range_start).split("\n"); + range_start += (line_start - tab.length) * 2; + t.selectionStart = range_start; + range_end = t.selectionStart + range.text.length; + tab = t.value.substr(0, range_start + range.text.length).split("\n"); + range_end += (line_start + line_nb - 1 - tab.length) * 2; + t.selectionEnd = range_end; + } + } catch (e) {} + } + if (t && t.id) { + setTimeout("get_IE_selection(document.getElementById('" + t.id + "'));", 50); + } + }; + + function IE_textarea_focus() { + event.srcElement.focused = true; + } + + function IE_textarea_blur() { + event.srcElement.focused = false; + } + + function set_IE_selection(t) { + var nbLineStart, nbLineStart, nbLineEnd, range; + if (!window.closed) { + nbLineStart = t.value.substr(0, t.selectionStart).split("\n").length - 1; + nbLineEnd = t.value.substr(0, t.selectionEnd).split("\n").length - 1; + try { + range = document.selection.createRange(); + range.moveToElementText(t); + range.setEndPoint('EndToStart', range); + range.moveStart('character', t.selectionStart - nbLineStart); + range.moveEnd('character', t.selectionEnd - nbLineEnd - (t.selectionStart - nbLineStart)); + range.select(); + } catch (e) {} + } + }; + eAL.waiting_loading["elements_functions.js"] = "loaded"; + EAL.prototype.start_resize_area = function() { + var d = document, + a, div, width, height, father; + d.onmouseup = eAL.end_resize_area; + d.onmousemove = eAL.resize_area; + eAL.toggle(eAL.resize["id"]); + a = eAs[eAL.resize["id"]]["textarea"]; + div = d.getElementById("edit_area_resize"); + if (!div) { + div = d.createElement("div"); + div.id = "edit_area_resize"; + div.style.border = "dashed #888888 1px"; + } + width = a.offsetWidth - 2; + height = a.offsetHeight - 2; + div.style.display = "block"; + div.style.width = width + "px"; + div.style.height = height + "px"; + father = a.parentNode; + father.insertBefore(div, a); + a.style.display = "none"; + eAL.resize["start_top"] = calculeOffsetTop(div); + eAL.resize["start_left"] = calculeOffsetLeft(div); + }; + EAL.prototype.end_resize_area = function(e) { + var d = document, + div, a, width, height; + d.onmouseup = ""; + d.onmousemove = ""; + div = d.getElementById("edit_area_resize"); + a = eAs[eAL.resize["id"]]["textarea"]; + width = Math.max(eAs[eAL.resize["id"]]["settings"]["min_width"], div.offsetWidth - 4); + height = Math.max(eAs[eAL.resize["id"]]["settings"]["min_height"], div.offsetHeight - 4); + if (eAL.isIE == 6) { + width -= 2; + height -= 2; + } + a.style.width = width + "px"; + a.style.height = height + "px"; + div.style.display = "none"; + a.style.display = "inline"; + a.selectionStart = eAL.resize["selectionStart"]; + a.selectionEnd = eAL.resize["selectionEnd"]; + eAL.toggle(eAL.resize["id"]); + return false; + }; + EAL.prototype.resize_area = function(e) { + var allow, newHeight, newWidth; + allow = eAs[eAL.resize["id"]]["settings"]["allow_resize"]; + if (allow == "both" || allow == "y") { + newHeight = Math.max(20, getMouseY(e) - eAL.resize["start_top"]); + document.getElementById("edit_area_resize").style.height = newHeight + "px"; + } + if (allow == "both" || allow == "x") { + newWidth = Math.max(20, getMouseX(e) - eAL.resize["start_left"]); + document.getElementById("edit_area_resize").style.width = newWidth + "px"; + } + return false; + }; + eAL.waiting_loading["resize_area.js"] = "loaded"; + EAL.prototype.get_regexp = function(text_array) { + res = "(\\b)("; + for (i = 0; i < text_array.length; i++) { + if (i > 0) res += "|"; + res += this.get_escaped_regexp(text_array[i]); + } + res += ")(\\b)"; + reg = new RegExp(res); + return res; + }; + EAL.prototype.get_escaped_regexp = function(str) { + return str.toString().replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g, "\\$1"); + }; + EAL.prototype.init_syntax_regexp = function() { + var lang_style = {}; + for (var lang in this.load_syntax) { + if (!this.syntax[lang]) { + this.syntax[lang] = {}; + this.syntax[lang]["keywords_reg_exp"] = {}; + this.keywords_reg_exp_nb = 0; + if (this.load_syntax[lang]['KEYWORDS']) { + param = "g"; + if (this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE'] === false) param += "i"; + for (var i in this.load_syntax[lang]['KEYWORDS']) { + if (typeof(this.load_syntax[lang]['KEYWORDS'][i]) == "function") continue; + this.syntax[lang]["keywords_reg_exp"][i] = new RegExp(this.get_regexp(this.load_syntax[lang]['KEYWORDS'][i]), param); + this.keywords_reg_exp_nb++; + } + } + if (this.load_syntax[lang]['OPERATORS']) { + var str = ""; + var nb = 0; + for (var i in this.load_syntax[lang]['OPERATORS']) { + if (typeof(this.load_syntax[lang]['OPERATORS'][i]) == "function") continue; + if (nb > 0) str += "|"; + str += this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]); + nb++; + } + if (str.length > 0) this.syntax[lang]["operators_reg_exp"] = new RegExp("(" + str + ")", "g"); + } + if (this.load_syntax[lang]['DELIMITERS']) { + var str = ""; + var nb = 0; + for (var i in this.load_syntax[lang]['DELIMITERS']) { + if (typeof(this.load_syntax[lang]['DELIMITERS'][i]) == "function") continue; + if (nb > 0) str += "|"; + str += this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]); + nb++; + } + if (str.length > 0) this.syntax[lang]["delimiters_reg_exp"] = new RegExp("(" + str + ")", "g"); + } + var syntax_trace = []; + this.syntax[lang]["quotes"] = {}; + var quote_tab = []; + if (this.load_syntax[lang]['QUOTEMARKS']) { + for (var i in this.load_syntax[lang]['QUOTEMARKS']) { + if (typeof(this.load_syntax[lang]['QUOTEMARKS'][i]) == "function") continue; + var x = this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]); + this.syntax[lang]["quotes"][x] = x; + quote_tab[quote_tab.length] = "(" + x + "(\\\\.|[^" + x + "])*(?:" + x + "|$))"; + syntax_trace.push(x); + } + } + this.syntax[lang]["comments"] = {}; + if (this.load_syntax[lang]['COMMENT_SINGLE']) { + for (var i in this.load_syntax[lang]['COMMENT_SINGLE']) { + if (typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i]) == "function") continue; + var x = this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]); + quote_tab[quote_tab.length] = "(" + x + "(.|\\r|\\t)*(\\n|$))"; + syntax_trace.push(x); + this.syntax[lang]["comments"][x] = "\n"; + } + } + if (this.load_syntax[lang]['COMMENT_MULTI']) { + for (var i in this.load_syntax[lang]['COMMENT_MULTI']) { + if (typeof(this.load_syntax[lang]['COMMENT_MULTI'][i]) == "function") continue; + var start = this.get_escaped_regexp(i); + var end = this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]); + quote_tab[quote_tab.length] = "(" + start + "(.|\\n|\\r)*?(" + end + "|$))"; + syntax_trace.push(start); + syntax_trace.push(end); + this.syntax[lang]["comments"][i] = this.load_syntax[lang]['COMMENT_MULTI'][i]; + } + } + if (quote_tab.length > 0) this.syntax[lang]["comment_or_quote_reg_exp"] = new RegExp("(" + quote_tab.join("|") + ")", "gi"); + if (syntax_trace.length > 0) this.syntax[lang]["syntax_trace_regexp"] = new RegExp("((.|\n)*?)(\\\\*(" + syntax_trace.join("|") + "|$))", "gmi"); + if (this.load_syntax[lang]['SCRIPT_DELIMITERS']) { + this.syntax[lang]["script_delimiters"] = {}; + for (var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']) { + if (typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i]) == "function") continue; + this.syntax[lang]["script_delimiters"][i] = this.load_syntax[lang]['SCRIPT_DELIMITERS']; + } + } + this.syntax[lang]["custom_regexp"] = {}; + if (this.load_syntax[lang]['REGEXPS']) { + for (var i in this.load_syntax[lang]['REGEXPS']) { + if (typeof(this.load_syntax[lang]['REGEXPS'][i]) == "function") continue; + var val = this.load_syntax[lang]['REGEXPS'][i]; + if (!this.syntax[lang]["custom_regexp"][val['execute']]) this.syntax[lang]["custom_regexp"][val['execute']] = {}; + this.syntax[lang]["custom_regexp"][val['execute']][i] = { + 'regexp': new RegExp(val['search'], val['modifiers']), + 'class': val['class'] + }; + } + } + if (this.load_syntax[lang]['STYLES']) { + lang_style[lang] = {}; + for (var i in this.load_syntax[lang]['STYLES']) { + if (typeof(this.load_syntax[lang]['STYLES'][i]) == "function") continue; + if (typeof(this.load_syntax[lang]['STYLES'][i]) != "string") { + for (var j in this.load_syntax[lang]['STYLES'][i]) { + lang_style[lang][j] = this.load_syntax[lang]['STYLES'][i][j]; + } + } else { + lang_style[lang][i] = this.load_syntax[lang]['STYLES'][i]; + } + } + } + var style = ""; + for (var i in lang_style[lang]) { + if (lang_style[lang][i].length > 0) { + style += "." + lang + " ." + i.toLowerCase() + " span{" + lang_style[lang][i] + "}\n"; + style += "." + lang + " ." + i.toLowerCase() + "{" + lang_style[lang][i] + "}\n"; + } + } + this.syntax[lang]["styles"] = style; + } + } + }; + eAL.waiting_loading["reg_syntax.js"] = "loaded"; + var editAreaLoader = eAL; + var editAreas = eAs; + EditAreaLoader = EAL; + editAreaLoader.iframe_script = "".replace(/Á/g, 'this').replace(/Â/g, 'textarea').replace(/Ã/g, 'function').replace(/Ä/g, 'prototype').replace(/Å/g, 'settings').replace(/Æ/g, 'length').replace(/Ç/g, 'style').replace(/È/g, 'parent').replace(/É/g, 'last_selection').replace(/Ê/g, 'value').replace(/Ë/g, 'true').replace(/Ì/g, 'false'); + editAreaLoader.template = " EditArea [__CSSRULES__] [__JSCODE__]
[__TOOLBAR__]
 
 
{$position}: {$line_abbr} 0, {$char_abbr} 0 {$total}: {$line_abbr} 0, {$char_abbr} 0 resize
{$processing}
{$search} {$close_popup}
{$replace} {$move_popup}

{$find_next} {$replace} {$replace_all}
{$close_popup}

Editarea [__EA_VERSION__]


{$shortcuts}:

{$tab}: {$add_tab}
{$shift}+{$tab}: {$remove_tab}
{$ctrl}+f: {$search_command}
{$ctrl}+r: {$replace_command}
{$ctrl}+h: {$highlight}
{$ctrl}+g: {$go_to_line}
{$ctrl}+z: {$undo}
{$ctrl}+y: {$redo}
{$ctrl}+e: {$help}
{$ctrl}+q, {$esc}: {$close_popup}
{$accesskey} E: {$toggle}

{$about_notice}
"; + editAreaLoader.iframe_css = ""; \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/autocompletion.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/autocompletion.gif new file mode 100644 index 0000000..f3dfc2e Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/autocompletion.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/close.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/close.gif new file mode 100644 index 0000000..679ca2a Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/close.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/fullscreen.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/fullscreen.gif new file mode 100644 index 0000000..66fa6d9 Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/fullscreen.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/go_to_line.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/go_to_line.gif new file mode 100644 index 0000000..06042ec Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/go_to_line.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/help.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/help.gif new file mode 100644 index 0000000..51a1ee4 Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/help.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/highlight.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/highlight.gif new file mode 100644 index 0000000..16491f6 Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/highlight.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/load.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/load.gif new file mode 100644 index 0000000..461698f Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/load.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/move.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/move.gif new file mode 100644 index 0000000..d15f9f5 Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/move.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/newdocument.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/newdocument.gif new file mode 100644 index 0000000..a9d2938 Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/newdocument.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/opacity.png b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/opacity.png new file mode 100644 index 0000000..b4217cb Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/opacity.png differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/processing.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/processing.gif new file mode 100644 index 0000000..cce32f2 Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/processing.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/redo.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/redo.gif new file mode 100644 index 0000000..3af9069 Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/redo.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/reset_highlight.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/reset_highlight.gif new file mode 100644 index 0000000..0fa3cb7 Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/reset_highlight.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/save.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/save.gif new file mode 100644 index 0000000..2777beb Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/save.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/search.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/search.gif new file mode 100644 index 0000000..cfe76b5 Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/search.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/smooth_selection.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/smooth_selection.gif new file mode 100644 index 0000000..8a532e5 Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/smooth_selection.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/spacer.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/spacer.gif new file mode 100644 index 0000000..3884865 Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/spacer.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/statusbar_resize.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/statusbar_resize.gif new file mode 100644 index 0000000..af89d80 Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/statusbar_resize.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/undo.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/undo.gif new file mode 100644 index 0000000..520796d Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/undo.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/word_wrap.gif b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/word_wrap.gif new file mode 100644 index 0000000..8f256cc Binary files /dev/null and b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/images/word_wrap.gif differ diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/bg.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/bg.js new file mode 100644 index 0000000..9fdcec4 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/bg.js @@ -0,0 +1,54 @@ +/* + * Bulgarian translation + * Author: Valentin Hristov + * Company: SOFTKIT Bulgarian + * Site: http://www.softkit-bg.com + */ +editAreaLoader.lang["bg"]={ +new_document: "нов документ", +search_button: "търсене и замяна", +search_command: "търси следващия / отвори прозорец с търсачка", +search: "търсене", +replace: "замяна", +replace_command: "замяна / отвори прозорец с търсачка", +find_next: "намери следващия", +replace_all: "замени всички", +reg_exp: "реголярни изрази", +match_case: "чуствителен към регистъра", +not_found: "няма резултат.", +occurrence_replaced: "замяната е осъществена.", +search_field_empty: "Полето за търсене е празно", +restart_search_at_begin: "До края на документа. Почни с началото.", +move_popup: "премести прозореца с търсачката", +font_size: "--Размер на шрифта--", +go_to_line: "премени към реда", +go_to_line_prompt: "премени към номера на реда:", +undo: "отмени", +redo: "върни", +change_smooth_selection: "включи/изключи някой от функциите за преглед (по красиво, но повече натоварва)", +highlight: "превключване на оцветяване на синтаксиса включена/изключена", +reset_highlight: "въстанови оцветяване на синтаксиса (ако не е синхронизиран с текста)", +word_wrap: "режим на пренасяне на дълги редове", +help: "за програмата", +save: "съхрани", +load: "зареди", +line_abbr: "Стр", +char_abbr: "Стлб", +position: "Позиция", +total: "Всичко", +close_popup: "затвори прозореца", +shortcuts: "Бързи клавиши", +add_tab: "добави табулация в текста", +remove_tab: "премахни табулацията в текста", +about_notice: "Внимание: използвайте функцията оцветяване на синтаксиса само за малки текстове", +toggle: "Превключи редактор", +accesskey: "Бърз клавиш", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Зареждане...", +fullscreen: "на цял екран", +syntax_selection: "--Синтаксис--", +close_tab: "Затвори файла" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/cs.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/cs.js new file mode 100644 index 0000000..b09a277 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/cs.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["cs"]={ +new_document: "Nový dokument", +search_button: "Najdi a nahraď", +search_command: "Hledej další / otevři vyhledávací pole", +search: "Hledej", +replace: "Nahraď", +replace_command: "Nahraď / otevři vyhledávací pole", +find_next: "Najdi další", +replace_all: "Nahraď vše", +reg_exp: "platné výrazy", +match_case: "vyhodnocené výrazy", +not_found: "nenalezené.", +occurrence_replaced: "výskyty nahrazené.", +search_field_empty: "Pole vyhledávání je prázdné", +restart_search_at_begin: "Dosažen konec souboru, začínám od začátku.", +move_popup: "Přesuň vyhledávací okno", +font_size: "--Velikost textu--", +go_to_line: "Přejdi na řádek", +go_to_line_prompt: "Přejdi na řádek:", +undo: "krok zpět", +redo: "znovu", +change_smooth_selection: "Povolit nebo zakázat některé ze zobrazených funkcí (účelnější zobrazení požaduje větší zatížení procesoru)", +highlight: "Zvýrazňování syntaxe zap./vyp.", +reset_highlight: "Obnovit zvýraznění (v případě nesrovnalostí)", +word_wrap: "toggle word wrapping mode", +help: "O programu", +save: "Uložit", +load: "Otevřít", +line_abbr: "Ř.", +char_abbr: "S.", +position: "Pozice", +total: "Celkem", +close_popup: "Zavřít okno", +shortcuts: "Zkratky", +add_tab: "Přidat tabulování textu", +remove_tab: "Odtsranit tabulování textu", +about_notice: "Upozornění! Funkce zvýrazňování textu je k dispozici pouze pro malý text", +toggle: "Přepnout editor", +accesskey: "Přístupová klávesa", +tab: "Záložka", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Zpracovávám ...", +fullscreen: "Celá obrazovka", +syntax_selection: "--vyber zvýrazňovač--", +close_tab: "Close file" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/de.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/de.js new file mode 100644 index 0000000..f23ea7b --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/de.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["de"]={ +new_document: "Neues Dokument", +search_button: "Suchen und Ersetzen", +search_command: "Weitersuchen / öffne Suchfeld", +search: "Suchen", +replace: "Ersetzen", +replace_command: "Ersetzen / öffne Suchfeld", +find_next: "Weitersuchen", +replace_all: "Ersetze alle Treffer", +reg_exp: "reguläre Ausdrücke", +match_case: "passt auf den Begriff
", +not_found: "Nicht gefunden.", +occurrence_replaced: "Die Vorkommen wurden ersetzt.", +search_field_empty: "Leeres Suchfeld", +restart_search_at_begin: "Ende des zu durchsuchenden Bereiches erreicht. Es wird die Suche von Anfang an fortgesetzt.", //find a shorter translation +move_popup: "Suchfenster bewegen", +font_size: "--Schriftgröße--", +go_to_line: "Gehe zu Zeile", +go_to_line_prompt: "Gehe zu Zeilennummmer:", +undo: "Rückgängig", +redo: "Wiederherstellen", +change_smooth_selection: "Aktiviere/Deaktiviere einige Features (weniger Bildschirmnutzung aber mehr CPU-Belastung)", +highlight: "Syntax Highlighting an- und ausschalten", +reset_highlight: "Highlighting zurücksetzen (falls mit Text nicht konform)", +word_wrap: "Toggle word wrapping mode", +help: "Info", +save: "Speichern", +load: "Öffnen", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Position", +total: "Gesamt", +close_popup: "Popup schließen", +shortcuts: "Shortcuts", +add_tab: "Tab zum Text hinzufügen", +remove_tab: "Tab aus Text entfernen", +about_notice: "Bemerkung: Syntax Highlighting ist nur für kurze Texte", +toggle: "Editor an- und ausschalten", +accesskey: "Accesskey", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "In Bearbeitung...", +fullscreen: "Full-Screen", +syntax_selection: "--Syntax--", +close_tab: "Close file" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/dk.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/dk.js new file mode 100644 index 0000000..1381de2 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/dk.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["dk"]={ +new_document: "nyt tomt dokument", +search_button: "søg og erstat", +search_command: "find næste / åben søgefelt", +search: "søg", +replace: "erstat", +replace_command: "erstat / åben søgefelt", +find_next: "find næste", +replace_all: "erstat alle", +reg_exp: "regular expressions", +match_case: "forskel på store/små bogstaver
", +not_found: "not found.", +occurrence_replaced: "occurences replaced.", +search_field_empty: "Search field empty", +restart_search_at_begin: "End of area reached. Restart at begin.", +move_popup: "flyt søgepopup", +font_size: "--Skriftstørrelse--", +go_to_line: "gå til linie", +go_to_line_prompt: "gå til linienummer:", +undo: "fortryd", +redo: "gentag", +change_smooth_selection: "slå display funktioner til/fra (smartere display men mere CPU krævende)", +highlight: "slå syntax highlight til/fra", +reset_highlight: "nulstil highlight (hvis den er desynkroniseret fra teksten)", +word_wrap: "toggle word wrapping mode", +help: "om", +save: "gem", +load: "hent", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Position", +total: "Total", +close_popup: "luk popup", +shortcuts: "Genveje", +add_tab: "tilføj tabulation til tekst", +remove_tab: "fjern tabulation fra tekst", +about_notice: "Husk: syntax highlight funktionen bør kun bruge til små tekster", +toggle: "Slå editor til / fra", +accesskey: "Accesskey", +tab: "Tab", +shift: "Skift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Processing...", +fullscreen: "fullscreen", +syntax_selection: "--Syntax--", +close_tab: "Close file" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/en.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/en.js new file mode 100644 index 0000000..9209f89 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/en.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["en"]={ +new_document: "new empty document", +search_button: "search and replace", +search_command: "search next / open search area", +search: "search", +replace: "replace", +replace_command: "replace / open search area", +find_next: "find next", +replace_all: "replace all", +reg_exp: "regular expressions", +match_case: "match case", +not_found: "not found.", +occurrence_replaced: "occurences replaced.", +search_field_empty: "Search field empty", +restart_search_at_begin: "End of area reached. Restart at begin.", +move_popup: "move search popup", +font_size: "--Font size--", +go_to_line: "go to line", +go_to_line_prompt: "go to line number:", +undo: "undo", +redo: "redo", +change_smooth_selection: "enable/disable some display features (smarter display but more CPU charge)", +highlight: "toggle syntax highlight on/off", +reset_highlight: "reset highlight (if desyncronized from text)", +word_wrap: "toggle word wrapping mode", +help: "about", +save: "save", +load: "load", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Position", +total: "Total", +close_popup: "close popup", +shortcuts: "Shortcuts", +add_tab: "add tabulation to text", +remove_tab: "remove tabulation to text", +about_notice: "Notice: syntax highlight function is only for small text", +toggle: "Toggle editor", +accesskey: "Accesskey", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Processing...", +fullscreen: "fullscreen", +syntax_selection: "--Syntax--", +close_tab: "Close file" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/eo.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/eo.js new file mode 100644 index 0000000..6583609 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/eo.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["eo"]={ +new_document: "nova dokumento (vakigas la enhavon)", +search_button: "serĉi / anstataŭigi", +search_command: "pluserĉi / malfermi la serĉo-fenestron", +search: "serĉi", +replace: "anstataŭigi", +replace_command: "anstataŭigi / malfermi la serĉo-fenestron", +find_next: "serĉi", +replace_all: "anstataŭigi ĉion", +reg_exp: "regula esprimo", +match_case: "respekti la usklecon", +not_found: "ne trovita.", +occurrence_replaced: "anstataŭigoj plenumitaj.", +search_field_empty: "La kampo estas malplena.", +restart_search_at_begin: "Fino de teksto ĝisrirata, ĉu daŭrigi el la komenco?", +move_popup: "movi la serĉo-fenestron", +font_size: "--Tipara grando--", +go_to_line: "iri al la linio", +go_to_line_prompt: "iri al la linio numero:", +undo: "rezigni", +redo: "refari", +change_smooth_selection: "ebligi/malebligi la funkcioj de vidigo (pli bona vidigo, sed pli da ŝarĝo de la ĉeforgano)", +highlight: "ebligi/malebligi la sintaksan kolorigon", +reset_highlight: "repravalorizi la sintaksan kolorigon (se malsinkronigon de la teksto)", +word_wrap: "toggle word wrapping mode", +help: "pri", +save: "registri", +load: "ŝarĝi", +line_abbr: "Ln", +char_abbr: "Sg", +position: "Pozicio", +total: "Sumo", +close_popup: "fermi la ŝprucfenestron", +shortcuts: "Fulmoklavo", +add_tab: "aldoni tabon en la tekston", +remove_tab: "forigi tablon el la teksto", +about_notice: "Noto: la sintaksa kolorigo estas nur prikalkulita por mallongaj tekstoj.", +toggle: "baskuligi la redaktilon", +accesskey: "Fulmoklavo", +tab: "Tab", +shift: "Maj", +ctrl: "Ktrl", +esc: "Esk", +processing: "ŝargante...", +fullscreen: "plenekrane", +syntax_selection: "--Sintakso--", +close_tab: "Fermi la dosieron" +}; \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/es.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/es.js new file mode 100644 index 0000000..3892c1c --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/es.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["es"]={ +new_document: "nuevo documento vacío", +search_button: "buscar y reemplazar", +search_command: "buscar siguiente / abrir área de búsqueda", +search: "buscar", +replace: "reemplazar", +replace_command: "reemplazar / abrir área de búsqueda", +find_next: "encontrar siguiente", +replace_all: "reemplazar todos", +reg_exp: "expresiones regulares", +match_case: "coincidir capitalización", +not_found: "no encontrado.", +occurrence_replaced: "ocurrencias reemplazadas.", +search_field_empty: "Campo de búsqueda vacío", +restart_search_at_begin: "Se ha llegado al final del área. Se va a seguir desde el principio.", +move_popup: "mover la ventana de búsqueda", +font_size: "--Tamaño de la fuente--", +go_to_line: "ir a la línea", +go_to_line_prompt: "ir a la línea número:", +undo: "deshacer", +redo: "rehacer", +change_smooth_selection: "activar/desactivar algunas características de visualización (visualización más inteligente pero más carga de CPU)", +highlight: "intercambiar resaltado de sintaxis", +reset_highlight: "reinicializar resaltado (si no esta sincronizado con el texto)", +word_wrap: "toggle word wrapping mode", +help: "acerca", +save: "guardar", +load: "cargar", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Posición", +total: "Total", +close_popup: "recuadro de cierre", +shortcuts: "Atajos", +add_tab: "añadir tabulado al texto", +remove_tab: "borrar tabulado del texto", +about_notice: "Aviso: el resaltado de sintaxis sólo funciona para texto pequeño", +toggle: "Cambiar editor", +accesskey: "Tecla de acceso", +tab: "Tab", +shift: "Mayúsc", +ctrl: "Ctrl", +esc: "Esc", +processing: "Procesando...", +fullscreen: "pantalla completa", +syntax_selection: "--Syntax--", +close_tab: "Close file" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/fi.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/fi.js new file mode 100644 index 0000000..1837883 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/fi.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["fi"]={ +new_document: "uusi tyhjä dokumentti", +search_button: "etsi ja korvaa", +search_command: "etsi seuraava / avaa etsintävalikko", +search: "etsi", +replace: "korvaa", +replace_command: "korvaa / avaa etsintävalikko", +find_next: "etsi seuraava", +replace_all: "korvaa kaikki", +reg_exp: "säännölliset lausekkeet", +match_case: "täsmää kirjainkokoon", +not_found: "ei löytynyt.", +occurrence_replaced: "esiintymää korvattu.", +search_field_empty: "Haettava merkkijono on tyhjä", +restart_search_at_begin: "Alueen loppu saavutettiin. Aloitetaan alusta.", +move_popup: "siirrä etsintävalikkoa", +font_size: "--Fontin koko--", +go_to_line: "siirry riville", +go_to_line_prompt: "mene riville:", +undo: "peruuta", +redo: "tee uudelleen", +change_smooth_selection: "kytke/sammuta joitakin näyttötoimintoja (Älykkäämpi toiminta, mutta suurempi CPU kuormitus)", +highlight: "kytke syntaksikorostus päälle/pois", +reset_highlight: "resetoi syntaksikorostus (jos teksti ei ole synkassa korostuksen kanssa)", +word_wrap: "toggle word wrapping mode", +help: "tietoja", +save: "tallenna", +load: "lataa", +line_abbr: "Rv", +char_abbr: "Pos", +position: "Paikka", +total: "Yhteensä", +close_popup: "sulje valikko", +shortcuts: "Pikatoiminnot", +add_tab: "lisää sisennys tekstiin", +remove_tab: "poista sisennys tekstistä", +about_notice: "Huomautus: syntaksinkorostus toimii vain pienelle tekstille", +toggle: "Kytke editori", +accesskey: "Pikanäppäin", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Odota...", +fullscreen: "koko ruutu", +syntax_selection: "--Syntaksi--", +close_tab: "Sulje tiedosto" +}; \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/fr.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/fr.js new file mode 100644 index 0000000..f774163 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/fr.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["fr"]={ +new_document: "nouveau document (efface le contenu)", +search_button: "rechercher / remplacer", +search_command: "rechercher suivant / ouvrir la fenêtre de recherche", +search: "rechercher", +replace: "remplacer", +replace_command: "remplacer / ouvrir la fenêtre de recherche", +find_next: "rechercher", +replace_all: "tout remplacer", +reg_exp: "expr. régulière", +match_case: "respecter la casse", +not_found: "pas trouvé.", +occurrence_replaced: "remplacements éffectués.", +search_field_empty: "Le champ de recherche est vide.", +restart_search_at_begin: "Fin du texte atteint, poursuite au début.", +move_popup: "déplacer la fenêtre de recherche", +font_size: "--Taille police--", +go_to_line: "aller à la ligne", +go_to_line_prompt: "aller a la ligne numero:", +undo: "annuler", +redo: "refaire", +change_smooth_selection: "activer/désactiver des fonctions d'affichage (meilleur affichage mais plus de charge processeur)", +highlight: "activer/désactiver la coloration syntaxique", +reset_highlight: "réinitialiser la coloration syntaxique (si désyncronisée du texte)", +word_wrap: "activer/désactiver les retours à la ligne automatiques", +help: "à propos", +save: "sauvegarder", +load: "charger", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Position", +total: "Total", +close_popup: "fermer le popup", +shortcuts: "Racourcis clavier", +add_tab: "ajouter une tabulation dans le texte", +remove_tab: "retirer une tabulation dans le texte", +about_notice: "Note: la coloration syntaxique n'est prévue que pour de courts textes.", +toggle: "basculer l'éditeur", +accesskey: "Accesskey", +tab: "Tab", +shift: "Maj", +ctrl: "Ctrl", +esc: "Esc", +processing: "chargement...", +fullscreen: "plein écran", +syntax_selection: "--Syntaxe--", +close_tab: "Fermer le fichier" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/hr.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/hr.js new file mode 100644 index 0000000..0429d3a --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/hr.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["hr"]={ +new_document: "Novi dokument", +search_button: "Traži i izmijeni", +search_command: "Traži dalje / Otvori prozor za traženje", +search: "Traži", +replace: "Izmijeni", +replace_command: "Izmijeni / Otvori prozor za traženje", +find_next: "Traži dalje", +replace_all: "Izmjeni sve", +reg_exp: "Regularni izrazi", +match_case: "Bitna vel. slova", +not_found: "nije naðeno.", +occurrence_replaced: "izmjenjenih.", +search_field_empty: "Prazno polje za traženje!", +restart_search_at_begin: "Došao do kraja. Poèeo od poèetka.", +move_popup: "Pomakni prozor", +font_size: "--Velièina teksta--", +go_to_line: "Odi na redak", +go_to_line_prompt: "Odi na redak:", +undo: "Vrati natrag", +redo: "Napravi ponovo", +change_smooth_selection: "Ukljuèi/iskljuèi neke moguænosti prikaza (pametniji prikaz, ali zagušeniji CPU)", +highlight: "Ukljuèi/iskljuèi bojanje sintakse", +reset_highlight: "Ponovi kolorizaciju (ako je nesinkronizirana s tekstom)", +word_wrap: "toggle word wrapping mode", +help: "O edit_area", +save: "Spremi", +load: "Uèitaj", +line_abbr: "Ln", +char_abbr: "Zn", +position: "Pozicija", +total: "Ukupno", +close_popup: "Zatvori prozor", +shortcuts: "Kratice", +add_tab: "Dodaj tabulaciju", +remove_tab: "Makni tabulaciju", +about_notice: "Napomena: koloriziranje sintakse je samo za kratke kodove", +toggle: "Prebaci naèin ureðivanja", +accesskey: "Accesskey", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Procesiram...", +fullscreen: "Cijeli prozor", +syntax_selection: "--Syntax--", +close_tab: "Close file" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/it.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/it.js new file mode 100644 index 0000000..e614367 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/it.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["it"]={ +new_document: "nuovo documento vuoto", +search_button: "cerca e sostituisci", +search_command: "trova successivo / apri finestra di ricerca", +search: "cerca", +replace: "sostituisci", +replace_command: "sostituisci / apri finestra di ricerca", +find_next: "trova successivo", +replace_all: "sostituisci tutti", +reg_exp: "espressioni regolari", +match_case: "confronta maiuscole/minuscole
", +not_found: "non trovato.", +occurrence_replaced: "occorrenze sostituite.", +search_field_empty: "Campo ricerca vuoto", +restart_search_at_begin: "Fine del testo raggiunta. Ricomincio dall'inizio.", +move_popup: "sposta popup di ricerca", +font_size: "-- Dimensione --", +go_to_line: "vai alla linea", +go_to_line_prompt: "vai alla linea numero:", +undo: "annulla", +redo: "ripeti", +change_smooth_selection: "abilita/disabilita alcune caratteristiche della visualizzazione", +highlight: "abilita/disabilita colorazione della sintassi", +reset_highlight: "aggiorna colorazione (se non sincronizzata)", +word_wrap: "toggle word wrapping mode", +help: "informazioni su...", +save: "salva", +load: "carica", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Posizione", +total: "Totale", +close_popup: "chiudi popup", +shortcuts: "Scorciatoie", +add_tab: "aggiungi tabulazione", +remove_tab: "rimuovi tabulazione", +about_notice: "Avviso: la colorazione della sintassi vale solo con testo piccolo", +toggle: "Abilita/disabilita editor", +accesskey: "Accesskey", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "In corso...", +fullscreen: "fullscreen", +syntax_selection: "--Syntax--", +close_tab: "Close file" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/ja.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/ja.js new file mode 100644 index 0000000..91b4909 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/ja.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["ja"]={ +new_document: "新規作成", +search_button: "検索・置換", +search_command: "次を検索 / 検索窓を表示", +search: "検索", +replace: "置換", +replace_command: "置換 / 置換窓を表示", +find_next: "次を検索", +replace_all: "全置換", +reg_exp: "正規表現", +match_case: "大文字小文字の区別", +not_found: "見つかりません。", +occurrence_replaced: "置換しました。", +search_field_empty: "検索対象文字列が空です。", +restart_search_at_begin: "終端に達しました、始めに戻ります", +move_popup: "検索窓を移動", +font_size: "--フォントサイズ--", +go_to_line: "指定行へ移動", +go_to_line_prompt: "指定行へ移動します:", +undo: "元に戻す", +redo: "やり直し", +change_smooth_selection: "スムース表示の切り替え(CPUを使います)", +highlight: "構文強調表示の切り替え", +reset_highlight: "構文強調表示のリセット", +word_wrap: "toggle word wrapping mode", +help: "ヘルプを表示", +save: "保存", +load: "読み込み", +line_abbr: "行", +char_abbr: "文字", +position: "位置", +total: "合計", +close_popup: "ポップアップを閉じる", +shortcuts: "ショートカット", +add_tab: "タブを挿入する", +remove_tab: "タブを削除する", +about_notice: "注意:構文強調表示は短いテキストでしか有効に機能しません。", +toggle: "テキストエリアとeditAreaの切り替え", +accesskey: "アクセスキー", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "処理中です...", +fullscreen: "fullscreen", +syntax_selection: "--Syntax--", +close_tab: "Close file" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/mk.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/mk.js new file mode 100644 index 0000000..4e14d12 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/mk.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["mk"]={ +new_document: "Нов документ", +search_button: "Најди и замени", +search_command: "Барај следно / Отвори нов прозорец за пребарување", +search: "Барај", +replace: "Замени", +replace_command: "Замени / Отвори прозорец за пребарување", +find_next: "најди следно", +replace_all: "Замени ги сите", +reg_exp: "Регуларни изрази", +match_case: "Битна е големината на буквите", +not_found: "не е пронајдено.", +occurrence_replaced: "замени.", +search_field_empty: "Полето за пребарување е празно", +restart_search_at_begin: "Крај на областа. Стартувај од почеток.", +move_popup: "Помести го прозорецот", +font_size: "--Големина на текстот--", +go_to_line: "Оди на линија", +go_to_line_prompt: "Оди на линија со број:", +undo: "Врати", +redo: "Повтори", +change_smooth_selection: "Вклучи/исклучи некои карактеристики за приказ (попаметен приказ, но поголемо оптеретување за процесорот)", +highlight: "Вклучи/исклучи осветлување на синтакса", +reset_highlight: "Ресетирај го осветлувањето на синтакса (доколку е десинхронизиранo со текстот)", +word_wrap: "toggle word wrapping mode", +help: "За", +save: "Зачувај", +load: "Вчитај", +line_abbr: "Лн", +char_abbr: "Зн", +position: "Позиција", +total: "Вкупно", +close_popup: "Затвори го прозорецот", +shortcuts: "Кратенки", +add_tab: "Додај табулација на текстот", +remove_tab: "Отстрани ја табулацијата", +about_notice: "Напомена: Осветлувањето на синтанса е само за краток текст", +toggle: "Смени начин на уредување", +accesskey: "Accesskey", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Обработувам...", +fullscreen: "Цел прозорец", +syntax_selection: "--Синтакса--", +close_tab: "Избери датотека" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/nl.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/nl.js new file mode 100644 index 0000000..84aa177 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/nl.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["nl"]={ +new_document: "nieuw leeg document", +search_button: "zoek en vervang", +search_command: "zoek volgende / zoekscherm openen", +search: "zoek", +replace: "vervang", +replace_command: "vervang / zoekscherm openen", +find_next: "volgende vinden", +replace_all: "alles vervangen", +reg_exp: "reguliere expressies", +match_case: "hoofdletter gevoelig", +not_found: "niet gevonden.", +occurrence_replaced: "object vervangen.", +search_field_empty: "Zoek veld leeg", +restart_search_at_begin: "Niet meer instanties gevonden, begin opnieuw", +move_popup: "versleep zoek scherm", +font_size: "--Letter grootte--", +go_to_line: "Ga naar regel", +go_to_line_prompt: "Ga naar regel nummer:", +undo: "Ongedaan maken", +redo: "Opnieuw doen", +change_smooth_selection: "zet wat schermopties aan/uit (kan langzamer zijn)", +highlight: "zet syntax highlight aan/uit", +reset_highlight: "reset highlight (indien gedesynchronizeerd)", +word_wrap: "toggle word wrapping mode", +help: "informatie", +save: "opslaan", +load: "laden", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Positie", +total: "Totaal", +close_popup: "Popup sluiten", +shortcuts: "Snelkoppelingen", +add_tab: "voeg tabs toe in tekst", +remove_tab: "verwijder tabs uit tekst", +about_notice: "Notitie: syntax highlight functie is alleen voor kleine tekst", +toggle: "geavanceerde bewerkingsopties", +accesskey: "Accessknop", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Verwerken...", +fullscreen: "fullscreen", +syntax_selection: "--Syntax--", +close_tab: "Close file" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/pl.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/pl.js new file mode 100644 index 0000000..ae03d60 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/pl.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["pl"]={ +new_document: "nowy dokument", +search_button: "znajdź i zamień", +search_command: "znajdź następny", +search: "znajdź", +replace: "zamień", +replace_command: "zamień", +find_next: "następny", +replace_all: "zamień wszystko", +reg_exp: "wyrażenie regularne", +match_case: "uwzględnij wielkość liter
", +not_found: "nie znaleziono.", +occurrence_replaced: "wystąpień zamieniono.", +search_field_empty: "Nie wprowadzono tekstu", +restart_search_at_begin: "Koniec dokumentu. Wyszukiwanie od początku.", +move_popup: "przesuń okienko wyszukiwania", +font_size: "Rozmiar", +go_to_line: "idź do linii", +go_to_line_prompt: "numer linii:", +undo: "cofnij", +redo: "przywróć", +change_smooth_selection: "włącz/wyłącz niektóre opcje wyglądu (zaawansowane opcje wyglądu obciążają procesor)", +highlight: "włącz/wyłącz podświetlanie składni", +reset_highlight: "odśwież podświetlanie składni (jeśli rozsynchronizowało się z tekstem)", +word_wrap: "toggle word wrapping mode", +help: "o programie", +save: "zapisz", +load: "otwórz", +line_abbr: "Ln", +char_abbr: "Zn", +position: "Pozycja", +total: "W sumie", +close_popup: "zamknij okienko", +shortcuts: "Skróty klawiaturowe", +add_tab: "dodaj wcięcie do zaznaczonego tekstu", +remove_tab: "usuń wcięcie", +about_notice: "Uwaga: podświetlanie składni nie jest zalecane dla długich tekstów", +toggle: "Włącz/wyłącz edytor", +accesskey: "Alt+", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Przetwarzanie...", +fullscreen: "fullscreen", +syntax_selection: "--Syntax--", +close_tab: "Close file" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/pt.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/pt.js new file mode 100644 index 0000000..d785ec1 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/pt.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["pt"]={ +new_document: "Novo documento", +search_button: "Localizar e substituir", +search_command: "Localizar próximo", +search: "Localizar", +replace: "Substituir", +replace_command: "Substituir", +find_next: "Localizar", +replace_all: "Subst. tudo", +reg_exp: "Expressões regulares", +match_case: "Diferenciar maiúsculas e minúsculas", +not_found: "Não encontrado.", +occurrence_replaced: "Ocorrências substituidas", +search_field_empty: "Campo localizar vazio.", +restart_search_at_begin: "Fim das ocorrências. Recomeçar do inicio.", +move_popup: "Mover janela", +font_size: "--Tamanho da fonte--", +go_to_line: "Ir para linha", +go_to_line_prompt: "Ir para a linha:", +undo: "Desfazer", +redo: "Refazer", +change_smooth_selection: "Opções visuais", +highlight: "Cores de sintaxe", +reset_highlight: "Resetar cores (se não sincronizado)", +word_wrap: "toggle word wrapping mode", +help: "Sobre", +save: "Salvar", +load: "Carregar", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Posição", +total: "Total", +close_popup: "Fechar", +shortcuts: "Shortcuts", +add_tab: "Adicionar tabulação", +remove_tab: "Remover tabulação", +about_notice: "Atenção: Cores de sintaxe são indicados somente para textos pequenos", +toggle: "Exibir editor", +accesskey: "Accesskey", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Processando...", +fullscreen: "fullscreen", +syntax_selection: "--Syntax--", +close_tab: "Close file" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/ru.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/ru.js new file mode 100644 index 0000000..081e6b0 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/ru.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["ru"]={ +new_document: "новый пустой документ", +search_button: "поиск и замена", +search_command: "искать следующий / открыть панель поиска", +search: "поиск", +replace: "замена", +replace_command: "заменить / открыть панель поиска", +find_next: "найти следующее", +replace_all: "заменить все", +reg_exp: "регулярное выражение", +match_case: "учитывать регистр", +not_found: "не найдено.", +occurrence_replaced: "вхождение заменено.", +search_field_empty: "Поле поиска пустое", +restart_search_at_begin: "Достигнут конец документа. Начинаю с начала.", +move_popup: "переместить окно поиска", +font_size: "--Размер шрифта--", +go_to_line: "перейти к строке", +go_to_line_prompt: "перейти к строке номер:", +undo: "отменить", +redo: "вернуть", +change_smooth_selection: "включить/отключить некоторые функции просмотра (более красиво, но больше использует процессор)", +highlight: "переключить подсветку синтаксиса включена/выключена", +reset_highlight: "восстановить подсветку (если разсинхронизирована от текста)", +word_wrap: "toggle word wrapping mode", +help: "о программе", +save: "сохранить", +load: "загрузить", +line_abbr: "Стр", +char_abbr: "Стлб", +position: "Позиция", +total: "Всего", +close_popup: "закрыть всплывающее окно", +shortcuts: "Горячие клавиши", +add_tab: "добавить табуляцию в текст", +remove_tab: "убрать табуляцию из текста", +about_notice: "Внимание: функция подсветки синтаксиса только для небольших текстов", +toggle: "Переключить редактор", +accesskey: "Горячая клавиша", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Обработка...", +fullscreen: "полный экран", +syntax_selection: "--Синтакс--", +close_tab: "Закрыть файл" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/sk.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/sk.js new file mode 100644 index 0000000..c0b95c3 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/sk.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["sk"]={ +new_document: "nový prázdy dokument", +search_button: "vyhľadaj a nahraď", +search_command: "hľadaj ďalsšie / otvor vyhľadávacie pole", +search: "hľadaj", +replace: "nahraď", +replace_command: "nahraď / otvor vyhľadávacie pole", +find_next: "nájdi ďalšie", +replace_all: "nahraď všetko", +reg_exp: "platné výrazy", +match_case: "zhodujúce sa výrazy", +not_found: "nenájdené.", +occurrence_replaced: "výskyty nahradené.", +search_field_empty: "Pole vyhľadávanie je prádzne", +restart_search_at_begin: "End of area reached. Restart at begin.", +move_popup: "presuň vyhľadávacie okno", +font_size: "--Veľkosť textu--", +go_to_line: "prejdi na riadok", +go_to_line_prompt: "prejdi na riadok:", +undo: "krok späť", +redo: "prepracovať", +change_smooth_selection: "povoliť/zamietnúť niektoré zo zobrazených funkcií (účelnejšie zobrazenie vyžaduje väčšie zaťaženie procesora CPU)", +highlight: "prepnúť zvýrazňovanie syntaxe zap/vyp", +reset_highlight: "zrušiť zvýrazňovanie (ak je nesynchronizované s textom)", +word_wrap: "toggle word wrapping mode", +help: "o programe", +save: "uložiť", +load: "načítať", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Pozícia", +total: "Spolu", +close_popup: "zavrieť okno", +shortcuts: "Skratky", +add_tab: "pridať tabulovanie textu", +remove_tab: "odstrániť tabulovanie textu", +about_notice: "Upozornenie: funkcia zvýrazňovania syntaxe je dostupná iba pre malý text", +toggle: "Prepnúť editor", +accesskey: "Accesskey", +tab: "Záložka", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Spracúvam...", +fullscreen: "cel=a obrazovka", +syntax_selection: "--Vyber Syntax--", +close_tab: "Close file" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/zh.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/zh.js new file mode 100644 index 0000000..e51c532 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/langs/zh.js @@ -0,0 +1,48 @@ +editAreaLoader.lang["zh"]={ +new_document: "新建空白文档", +search_button: "查找与替换", +search_command: "查找下一个 / 打开查找框", +search: "查找", +replace: "替换", +replace_command: "替换 / 打开查找框", +find_next: "查找下一个", +replace_all: "全部替换", +reg_exp: "正则表达式", +match_case: "匹配大小写", +not_found: "未找到.", +occurrence_replaced: "处被替换.", +search_field_empty: "查找框没有内容", +restart_search_at_begin: "已到到文档末尾. 从头重新查找.", +move_popup: "移动查找对话框", +font_size: "--字体大小--", +go_to_line: "转到行", +go_to_line_prompt: "转到行:", +undo: "恢复", +redo: "重做", +change_smooth_selection: "启用/禁止一些显示特性(更好看但更耗费资源)", +highlight: "启用/禁止语法高亮", +reset_highlight: "重置语法高亮(当文本显示不同步时)", +word_wrap: "toggle word wrapping mode", +help: "关于", +save: "保存", +load: "加载", +line_abbr: "行", +char_abbr: "字符", +position: "位置", +total: "总计", +close_popup: "关闭对话框", +shortcuts: "快捷键", +add_tab: "添加制表符(Tab)", +remove_tab: "移除制表符(Tab)", +about_notice: "注意:语法高亮功能仅用于较少内容的文本(文件内容太大会导致浏览器反应慢)", +toggle: "切换编辑器", +accesskey: "快捷键", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "正在处理中...", +fullscreen: "全屏编辑", +syntax_selection: "--语法--", +close_tab: "关闭文件" +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/license_apache.txt b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/license_apache.txt new file mode 100644 index 0000000..3831171 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/license_apache.txt @@ -0,0 +1,7 @@ +Copyright 2008 Christophe Dolivet + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/basic.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/basic.js new file mode 100644 index 0000000..96ccc5b --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/basic.js @@ -0,0 +1,70 @@ +editAreaLoader.load_syntax["basic"] = { + 'DISPLAY_NAME' : 'Basic' + ,'COMMENT_SINGLE' : {1 : "'", 2 : 'rem'} + ,'COMMENT_MULTI' : { } + ,'QUOTEMARKS' : {1: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'statements' : [ + 'if','then','for','wend','while', + 'else','elseif','select','case','end select', + 'until','next','step','to','end if', 'call' + ] + ,'keywords' : [ + 'sub', 'end sub', 'function', 'end function', 'exit', + 'exit function', 'dim', 'redim', 'shared', 'const', + 'is', 'absolute', 'access', 'any', 'append', 'as', + 'base', 'beep', 'binary', 'bload', 'bsave', 'chain', + 'chdir', 'circle', 'clear', 'close', 'cls', 'color', + 'com', 'common', 'data', 'date', 'declare', 'def', + 'defdbl', 'defint', 'deflng', 'defsng', 'defstr', + 'double', 'draw', 'environ', 'erase', 'error', 'field', + 'files', 'fn', 'get', 'gosub', 'goto', 'integer', 'key', + 'kill', 'let', 'line', 'list', 'locate', 'lock', 'long', + 'lprint', 'lset', 'mkdir', 'name', 'off', 'on', 'open', + 'option', 'out', 'output', 'paint', 'palette', 'pcopy', + 'poke', 'preset', 'print', 'pset', 'put', 'random', + 'randomize', 'read', 'reset', 'restore', 'resume', + 'return', 'rmdir', 'rset', 'run', 'screen', 'seg', + 'shell', 'single', 'sleep', 'sound', 'static', 'stop', + 'strig', 'string', 'swap', 'system', 'time', 'timer', + 'troff', 'tron', 'type', 'unlock', 'using', 'view', + 'wait', 'width', 'window', 'write' + ] + ,'functions' : [ + 'abs', 'asc', 'atn', 'cdbl', 'chr', 'cint', 'clng', + 'cos', 'csng', 'csrlin', 'cvd', 'cvdmbf', 'cvi', 'cvl', + 'cvs', 'cvsmbf', 'eof', 'erdev', 'erl', 'err', 'exp', + 'fileattr', 'fix', 'fre', 'freefile', 'hex', 'inkey', + 'inp', 'input', 'instr', 'int', 'ioctl', 'lbound', + 'lcase', 'left', 'len', 'loc', 'lof', 'log', 'lpos', + 'ltrim', 'mid', 'mkd', 'mkdmbf', 'mki', 'mkl', 'mks', + 'mksmbf', 'oct', 'peek', 'pen', 'play', 'pmap', 'point', + 'pos', 'right', 'rnd', 'rtrim', 'seek', 'sgn', 'sin', + 'space', 'spc', 'sqr', 'stick', 'str', 'tab', 'tan', + 'ubound', 'ucase', 'val', 'varptr', 'varseg' + ] + ,'operators' : [ + 'and', 'eqv', 'imp', 'mod', 'not', 'or', 'xor' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '!', '&' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #99CC00;' + ,'QUOTESMARKS': 'color: #333399;' + ,'KEYWORDS' : { + 'keywords' : 'color: #3366FF;' + ,'functions' : 'color: #0000FF;' + ,'statements' : 'color: #3366FF;' + ,'operators' : 'color: #FF0000;' + } + ,'OPERATORS' : 'color: #FF0000;' + ,'DELIMITERS' : 'color: #0000FF;' + + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/brainfuck.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/brainfuck.js new file mode 100644 index 0000000..e6306b0 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/brainfuck.js @@ -0,0 +1,45 @@ +editAreaLoader.load_syntax["brainfuck"] = { + 'DISPLAY_NAME' : 'Brainfuck' + ,'COMMENT_SINGLE' : {} + ,'COMMENT_MULTI' : {} + ,'QUOTEMARKS' : {} + ,'KEYWORD_CASE_SENSITIVE' : true + ,'OPERATORS' :[ + '+', '-' + ] + ,'DELIMITERS' :[ + '[', ']' + ] + ,'REGEXPS' : { + 'bfispis' : { + 'search' : '()(\\.)()' + ,'class' : 'bfispis' + ,'modifiers' : 'g' + ,'execute' : 'before' + } + ,'bfupis' : { + 'search' : '()(\\,)()' + ,'class' : 'bfupis' + ,'modifiers' : 'g' + ,'execute' : 'before' + } + ,'bfmemory' : { + 'search' : '()([<>])()' + ,'class' : 'bfmemory' + ,'modifiers' : 'g' + ,'execute' : 'before' + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'OPERATORS' : 'color: #88AA00;' + ,'DELIMITERS' : 'color: #00C138;' + ,'REGEXPS' : { + 'bfispis' : 'color: #EE0000;' + ,'bfupis' : 'color: #4455ee;' + ,'bfmemory' : 'color: #DD00DD;' + } + } +}; + diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/c.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/c.js new file mode 100644 index 0000000..05d978c --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/c.js @@ -0,0 +1,63 @@ +editAreaLoader.load_syntax["c"] = { + 'DISPLAY_NAME' : 'C' + ,'COMMENT_SINGLE' : {1 : '//'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : true + ,'KEYWORDS' : { + 'constants' : [ + 'NULL', 'false', 'stdin', 'stdout', 'stderr', 'true' + ] + ,'types' : [ + 'FILE', 'auto', 'char', 'const', 'double', + 'extern', 'float', 'inline', 'int', 'long', 'register', + 'short', 'signed', 'size_t', 'static', 'struct', + 'time_t', 'typedef', 'union', 'unsigned', 'void', + 'volatile' + ] + ,'statements' : [ + 'do', 'else', 'enum', 'for', 'goto', 'if', 'sizeof', + 'switch', 'while' + ] + ,'keywords' : [ + 'break', 'case', 'continue', 'default', 'delete', + 'return' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'REGEXPS' : { + 'precompiler' : { + 'search' : '()(#[^\r\n]*)()' + ,'class' : 'precompiler' + ,'modifiers' : 'g' + ,'execute' : 'before' + } +/* ,'precompilerstring' : { + 'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])' + ,'class' : 'precompilerstring' + ,'modifiers' : 'g' + ,'execute' : 'before' + }*/ + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + 'constants' : 'color: #EE0000;' + ,'types' : 'color: #0000EE;' + ,'statements' : 'color: #60CA00;' + ,'keywords' : 'color: #48BDDF;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #0038E1;' + ,'REGEXPS' : { + 'precompiler' : 'color: #009900;' + ,'precompilerstring' : 'color: #994400;' + } + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/coldfusion.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/coldfusion.js new file mode 100644 index 0000000..d70657f --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/coldfusion.js @@ -0,0 +1,120 @@ +editAreaLoader.load_syntax["coldfusion"] = { + 'DISPLAY_NAME' : 'Coldfusion' + ,'COMMENT_SINGLE' : {1 : '//', 2 : '#'} + ,'COMMENT_MULTI' : {''} + ,'COMMENT_MULTI2' : {''} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'statements' : [ + 'include', 'require', 'include_once', 'require_once', + 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', + 'endif', 'switch', 'case', 'endswitch', + 'return', 'break', 'continue' + ] + ,'reserved' : [ + 'AND', 'break', 'case', 'CONTAIN', 'CONTAINS', 'continue', 'default', 'do', + 'DOES', 'else', 'EQ', 'EQUAL', 'EQUALTO', 'EQV', 'FALSE', 'for', 'GE', + 'GREATER', 'GT', 'GTE', 'if', 'IMP', 'in', 'IS', 'LE', 'LESS', 'LT', 'LTE', + 'MOD', 'NEQ', 'NOT', 'OR', 'return', 'switch', 'THAN', 'TO', 'TRUE', 'var', + 'while', 'XOR' + ] + ,'functions' : [ + 'Abs', 'ACos', 'ArrayAppend', 'ArrayAvg', 'ArrayClear', 'ArrayDeleteAt', 'ArrayInsertAt', + 'ArrayIsEmpty', 'ArrayLen', 'ArrayMax', 'ArrayMin', 'ArrayNew', 'ArrayPrepend', 'ArrayResize', + 'ArraySet', 'ArraySort', 'ArraySum', 'ArraySwap', 'ArrayToList', 'Asc', 'ASin', 'Atn', 'AuthenticatedContext', + 'AuthenticatedUser', 'BitAnd', 'BitMaskClear', 'BitMaskRead', 'BitMaskSet', 'BitNot', 'BitOr', + 'BitSHLN', 'BitSHRN', 'BitXor', 'Ceiling', 'Chr', 'CJustify', 'Compare', 'CompareNoCase', 'Cos', + 'CreateDate', 'CreateDateTime', 'CreateODBCDate', 'CreateODBCDateTime', 'CreateODBCTime', + 'CreateTime', 'CreateTimeSpan', 'DateAdd', 'DateCompare', 'DateConvert', 'DateDiff', + 'DateFormat', 'DatePart', 'Day', 'DayOfWeek', 'DayOfWeekAsString', 'DayOfYear', 'DaysInMonth', + 'DaysInYear', 'DE', 'DecimalFormat', 'DecrementValue', 'Decrypt', 'DeleteClientVariable', + 'DirectoryExists', 'DollarFormat', 'Duplicate', 'Encrypt', 'Evaluate', 'Exp', 'ExpandPath', + 'FileExists', 'Find', 'FindNoCase', 'FindOneOf', 'FirstDayOfMonth', 'Fix', 'FormatBaseN', + 'GetBaseTagData', 'GetBaseTagList', 'GetBaseTemplatePath', 'GetClientVariablesList', + 'GetCurrentTemplatePath', 'GetDirectoryFromPath', 'GetException', 'GetFileFromPath', + 'GetFunctionList', 'GetHttpTimeString', 'GetHttpRequestData', 'GetLocale', 'GetMetricData', + 'GetProfileString', 'GetTempDirectory', 'GetTempFile', 'GetTemplatePath', 'GetTickCount', + 'GetTimeZoneInfo', 'GetToken', 'Hash', 'Hour', 'HTMLCodeFormat', 'HTMLEditFormat', 'IIf', + 'IncrementValue', 'InputBaseN', 'Insert', 'Int', 'IsArray', 'IsAuthenticated', 'IsAuthorized', + 'IsBoolean', 'IsBinary', 'IsCustomFunction', 'IsDate', 'IsDebugMode', 'IsDefined', 'IsLeapYear', + 'IsNumeric', 'IsNumericDate', 'IsProtected', 'IsQuery', 'IsSimpleValue', 'IsStruct', 'IsWDDX', + 'JavaCast', 'JSStringFormat', 'LCase', 'Left', 'Len', 'ListAppend', 'ListChangeDelims', + 'ListContains', 'ListContainsNoCase', 'ListDeleteAt', 'ListFind', 'ListFindNoCase', 'ListFirst', + 'ListGetAt', 'ListInsertAt', 'ListLast', 'ListLen', 'ListPrepend', 'ListQualify', 'ListRest', + 'ListSetAt', 'ListSort', 'ListToArray', 'ListValueCount', 'ListValueCountNoCase', 'LJustify', + 'Log', 'Log10', 'LSCurrencyFormat', 'LSDateFormat', 'LSEuroCurrencyFormat', 'LSIsCurrency', + 'LSIsDate', 'LSIsNumeric', 'LSNumberFormat', 'LSParseCurrency', 'LSParseDateTime', 'LSParseNumber', + 'LSTimeFormat', 'LTrim', 'Max', 'Mid', 'Min', 'Minute', 'Month', 'MonthAsString', 'Now', 'NumberFormat', + 'ParagraphFormat', 'ParameterExists', 'ParseDateTime', 'Pi', 'PreserveSingleQuotes', 'Quarter', + 'QueryAddRow', 'QueryNew', 'QuerySetCell', 'QuotedValueList', 'Rand', 'Randomize', 'RandRange', + 'REFind', 'REFindNoCase', 'RemoveChars', 'RepeatString', 'Replace', 'ReplaceList', 'ReplaceNoCase', + 'REReplace', 'REReplaceNoCase', 'Reverse', 'Right', 'RJustify', 'Round', 'RTrim', 'Second', 'SetLocale', + 'SetProfileString', 'SetVariable', 'Sgn', 'Sin', 'SpanExcluding', 'SpanIncluding', 'Sqr', 'StripCR', + 'StructAppend', 'StructClear', 'StructCopy', 'StructCount', 'StructDelete', 'StructFind', 'StructFindKey', + 'StructFindValue', 'StructGet', 'StructInsert', 'StructIsEmpty', 'StructKeyArray', 'StructKeyExists', + 'StructKeyList', 'StructNew', 'StructSort', 'StructUpdate', 'Tan', 'TimeFormat', 'ToBase64', 'ToBinary', + 'ToString', 'Trim', 'UCase', 'URLDecode', 'URLEncodedFormat', 'Val', 'ValueList', 'Week', 'WriteOutput', + 'XMLFormat', 'Year', 'YesNoFormat' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '%', '!', '&&', '||' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'REGEXPS' : { + 'doctype' : { + 'search' : '()(]*>)()' + ,'class' : 'doctype' + ,'modifiers' : '' + ,'execute' : 'before' // before or after + } + ,'cftags' : { + 'search' : '(<)(/cf[a-z][^ \r\n\t>]*)([^>]*>)' + ,'class' : 'cftags' + ,'modifiers' : 'gi' + ,'execute' : 'before' // before or after + } + ,'cftags2' : { + 'search' : '(<)(cf[a-z][^ \r\n\t>]*)([^>]*>)' + ,'class' : 'cftags2' + ,'modifiers' : 'gi' + ,'execute' : 'before' // before or after + } + ,'tags' : { + 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)' + ,'class' : 'tags' + ,'modifiers' : 'gi' + ,'execute' : 'before' // before or after + } + ,'attributes' : { + 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)' + ,'class' : 'attributes' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + 'reserved' : 'color: #48BDDF;' + ,'functions' : 'color: #0000FF;' + ,'statements' : 'color: #60CA00;' + } + ,'OPERATORS' : 'color: #E775F0;' + ,'DELIMITERS' : '' + ,'REGEXPS' : { + 'attributes': 'color: #990033;' + ,'cftags': 'color: #990033;' + ,'cftags2': 'color: #990033;' + ,'tags': 'color: #000099;' + ,'doctype': 'color: #8DCFB5;' + ,'test': 'color: #00FF00;' + } + } +}; + + diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/cpp.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/cpp.js new file mode 100644 index 0000000..98e6493 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/cpp.js @@ -0,0 +1,66 @@ +editAreaLoader.load_syntax["cpp"] = { + 'DISPLAY_NAME' : 'CPP' + ,'COMMENT_SINGLE' : {1 : '//'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : true + ,'KEYWORDS' : { + 'constants' : [ + 'NULL', 'false', 'std', 'stdin', 'stdout', 'stderr', + 'true' + ] + ,'types' : [ + 'FILE', 'auto', 'char', 'class', 'const', 'double', + 'extern', 'float', 'friend', 'inline', 'int', + 'iterator', 'long', 'map', 'operator', 'queue', + 'register', 'short', 'signed', 'size_t', 'stack', + 'static', 'string', 'struct', 'time_t', 'typedef', + 'union', 'unsigned', 'vector', 'void', 'volatile' + ] + ,'statements' : [ + 'catch', 'do', 'else', 'enum', 'for', 'goto', 'if', + 'sizeof', 'switch', 'this', 'throw', 'try', 'while' + ] + ,'keywords' : [ + 'break', 'case', 'continue', 'default', 'delete', + 'namespace', 'new', 'private', 'protected', 'public', + 'return', 'using' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'REGEXPS' : { + 'precompiler' : { + 'search' : '()(#[^\r\n]*)()' + ,'class' : 'precompiler' + ,'modifiers' : 'g' + ,'execute' : 'before' + } +/* ,'precompilerstring' : { + 'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])' + ,'class' : 'precompilerstring' + ,'modifiers' : 'g' + ,'execute' : 'before' + }*/ + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + 'constants' : 'color: #EE0000;' + ,'types' : 'color: #0000EE;' + ,'statements' : 'color: #60CA00;' + ,'keywords' : 'color: #48BDDF;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #0038E1;' + ,'REGEXPS' : { + 'precompiler' : 'color: #009900;' + ,'precompilerstring' : 'color: #994400;' + } + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/css.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/css.js new file mode 100644 index 0000000..cff605a --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/css.js @@ -0,0 +1,85 @@ +editAreaLoader.load_syntax["css"] = { + 'DISPLAY_NAME' : 'CSS' + ,'COMMENT_SINGLE' : {1 : '@'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : ['"', "'"] + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'attributes' : [ + 'aqua', 'azimuth', 'background-attachment', 'background-color', + 'background-image', 'background-position', 'background-repeat', + 'background', 'border-bottom-color', 'border-bottom-style', + 'border-bottom-width', 'border-left-color', 'border-left-style', + 'border-left-width', 'border-right', 'border-right-color', + 'border-right-style', 'border-right-width', 'border-top-color', + 'border-top-style', 'border-top-width','border-bottom', 'border-collapse', + 'border-left', 'border-width', 'border-color', 'border-spacing', + 'border-style', 'border-top', 'border', 'caption-side', + 'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset', + 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display', + 'elevation', 'empty-cells', 'float', 'font-family', 'font-size', + 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', + 'font-weight', 'font', 'height', 'letter-spacing', 'line-height', + 'list-style', 'list-style-image', 'list-style-position', 'list-style-type', + 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin', + 'marker-offset', 'marks', 'max-height', 'max-width', 'min-height', + 'min-width', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style', + 'outline-width', 'overflow', 'padding-bottom', 'padding-left', + 'padding-right', 'padding-top', 'padding', 'page', 'page-break-after', + 'page-break-before', 'page-break-inside', 'pause-after', 'pause-before', + 'pause', 'pitch', 'pitch-range', 'play-during', 'position', 'quotes', + 'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation', + 'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration', + 'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi', + 'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows', + 'width', 'word-spacing', 'z-index', 'bottom', 'left' + ] + ,'values' : [ + 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid', + 'baseline', 'behind', 'below', 'bidi-override', 'black', 'blue', 'blink', 'block', 'bold', 'bolder', 'both', + 'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic', + 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive', + 'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double', + 'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded', + 'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia', + 'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher', + 'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline', + 'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana', + 'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low', + 'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace', + 'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize', + 'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline', + 'pointer', 'portrait', 'purple', 'px', + 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards', + 's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square', + 'static', 'status-bar', 'super', 'sw-resize', + 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent', + 'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url', + 'visible', + 'w-resize', 'wait', 'white', 'wider', + 'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', + 'yellow', 'yes' + ] + ,'specials' : [ + 'important' + ] + } + ,'OPERATORS' :[ + ':', ';', '!', '.', '#' + ] + ,'DELIMITERS' :[ + '{', '}' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + 'attributes' : 'color: #48BDDF;' + ,'values' : 'color: #2B60FF;' + ,'specials' : 'color: #FF0000;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #60CA00;' + + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/html.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/html.js new file mode 100644 index 0000000..66490b1 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/html.js @@ -0,0 +1,51 @@ +/* +* last update: 2006-08-24 +*/ + +editAreaLoader.load_syntax["html"] = { + 'DISPLAY_NAME' : 'HTML' + ,'COMMENT_SINGLE' : {} + ,'COMMENT_MULTI' : {''} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + } + ,'OPERATORS' :[ + ] + ,'DELIMITERS' :[ + ] + ,'REGEXPS' : { + 'doctype' : { + 'search' : '()(]*>)()' + ,'class' : 'doctype' + ,'modifiers' : '' + ,'execute' : 'before' // before or after + } + ,'tags' : { + 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)' + ,'class' : 'tags' + ,'modifiers' : 'gi' + ,'execute' : 'before' // before or after + } + ,'attributes' : { + 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)' + ,'class' : 'attributes' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + } + ,'OPERATORS' : 'color: #E775F0;' + ,'DELIMITERS' : '' + ,'REGEXPS' : { + 'attributes': 'color: #B1AC41;' + ,'tags': 'color: #E62253;' + ,'doctype': 'color: #8DCFB5;' + ,'test': 'color: #00FF00;' + } + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/java.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/java.js new file mode 100644 index 0000000..e14009b --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/java.js @@ -0,0 +1,57 @@ +editAreaLoader.load_syntax["java"] = { + 'DISPLAY_NAME' : 'Java' + ,'COMMENT_SINGLE': { 1: '//', 2: '@' } + , 'COMMENT_MULTI': { '/*': '*/' } + , 'QUOTEMARKS': { 1: "'", 2: '"' } + , 'KEYWORD_CASE_SENSITIVE': true + , 'KEYWORDS': { + 'constants': [ + 'null', 'false', 'true' + ] + , 'types': [ + 'String', 'int', 'short', 'long', 'char', 'double', 'byte', + 'float', 'static', 'void', 'private', 'boolean', 'protected', + 'public', 'const', 'class', 'final', 'abstract', 'volatile', + 'enum', 'transient', 'interface' + ] + , 'statements': [ + 'this', 'extends', 'if', 'do', 'while', 'try', 'catch', 'finally', + 'throw', 'throws', 'else', 'for', 'switch', 'continue', 'implements', + 'break', 'case', 'default', 'goto' + ] + , 'keywords': [ + 'new', 'return', 'import', 'native', 'super', 'package', 'assert', 'synchronized', + 'instanceof', 'strictfp' + ] + } + , 'OPERATORS': [ + '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&' + ] + , 'DELIMITERS': [ + '(', ')', '[', ']', '{', '}' + ] + , 'REGEXPS': { + 'precompiler': { + 'search': '()(#[^\r\n]*)()' + , 'class': 'precompiler' + , 'modifiers': 'g' + , 'execute': 'before' + } + } + , 'STYLES': { + 'COMMENTS': 'color: #AAAAAA;' + , 'QUOTESMARKS': 'color: #6381F8;' + , 'KEYWORDS': { + 'constants': 'color: #EE0000;' + , 'types': 'color: #0000EE;' + , 'statements': 'color: #60CA00;' + , 'keywords': 'color: #48BDDF;' + } + , 'OPERATORS': 'color: #FF00FF;' + , 'DELIMITERS': 'color: #0038E1;' + , 'REGEXPS': { + 'precompiler': 'color: #009900;' + , 'precompilerstring': 'color: #994400;' + } + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/js.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/js.js new file mode 100644 index 0000000..556566b --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/js.js @@ -0,0 +1,94 @@ +editAreaLoader.load_syntax["js"] = { + 'DISPLAY_NAME' : 'Javascript' + ,'COMMENT_SINGLE' : {1 : '//'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'statements' : [ + 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do', + 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item', + 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void', + 'while', 'write', 'with' + ] + ,'keywords' : [ + 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false', + 'function', 'import', 'namespace', 'new', 'null', 'package', 'private', + 'protected', 'public', 'super', 'true', 'use', 'var', 'window', 'document', + // the list below must be sorted and checked (if it is a keywords or a function and if it is not present twice + 'Link ', 'outerHeight ', 'Anchor', 'FileUpload', + 'location', 'outerWidth', 'Select', 'Area', 'find', 'Location', 'Packages', 'self', + 'arguments', 'locationbar', 'pageXoffset', 'Form', + 'Math', 'pageYoffset', 'setTimeout', 'assign', 'Frame', 'menubar', 'parent', 'status', + 'blur', 'frames', 'MimeType', 'parseFloat', 'statusbar', 'Boolean', 'Function', 'moveBy', + 'parseInt', 'stop', 'Button', 'getClass', 'moveTo', 'Password', 'String', 'callee', 'Hidden', + 'name', 'personalbar', 'Submit', 'caller', 'history', 'NaN', 'Plugin', 'sun', 'captureEvents', + 'History', 'navigate', 'print', 'taint', 'Checkbox', 'home', 'navigator', 'prompt', 'Text', + 'Image', 'Navigator', 'prototype', 'Textarea', 'clearTimeout', 'Infinity', + 'netscape', 'Radio', 'toolbar', 'close', 'innerHeight', 'Number', 'ref', 'top', 'closed', + 'innerWidth', 'Object', 'RegExp', 'toString', 'confirm', 'isFinite', 'onBlur', 'releaseEvents', + 'unescape', 'constructor', 'isNan', 'onError', 'Reset', 'untaint', 'Date', 'java', 'onFocus', + 'resizeBy', 'unwatch', 'defaultStatus', 'JavaArray', 'onLoad', 'resizeTo', 'valueOf', 'document', + 'JavaClass', 'onUnload', 'routeEvent', 'watch', 'Document', 'JavaObject', 'open', 'scroll', 'window', + 'Element', 'JavaPackage', 'opener', 'scrollbars', 'Window', 'escape', 'length', 'Option', 'scrollBy' + ] + ,'functions' : [ + // common functions for Window object + 'alert', 'Array', 'back', 'blur', 'clearInterval', 'close', 'confirm', 'eval ', 'focus', 'forward', 'home', + 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove', + 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'scrollTo', 'setInterval', 'status', + 'stop' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '%', '!' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + 'statements' : 'color: #60CA00;' + ,'keywords' : 'color: #48BDDF;' + ,'functions' : 'color: #2B60FF;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #0038E1;' + + } + ,'AUTO_COMPLETION' : { + "default": { // the name of this definition group. It's posisble to have different rules inside the same definition file + "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^" // \\s|\\.| + ,"possible_words_letters": "[a-zA-Z0-9_]+" + ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$" + ,"prefix_separator": "\\." + } + ,"CASE_SENSITIVE": true + ,"MAX_TEXT_LENGTH": 100 // the maximum length of the text being analyzed before the cursor position + ,"KEYWORDS": { + '': [ // the prefix of thoses items + /** + * 0 : the keyword the user is typing + * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous ) + * If empty the keyword will be displayed + * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed) + */ + ['Array', '§()', ''] + ,['alert', '§({@})', 'alert(String message)'] + ,['document'] + ,['window'] + ] + ,'window' : [ + ['location'] + ,['document'] + ,['scrollTo', 'scrollTo({@})', 'scrollTo(Int x,Int y)'] + ] + ,'location' : [ + ['href'] + ] + } + } + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/pas.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/pas.js new file mode 100644 index 0000000..26fb748 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/pas.js @@ -0,0 +1,83 @@ +editAreaLoader.load_syntax["pas"] = { + 'DISPLAY_NAME' : 'Pascal' + ,'COMMENT_SINGLE' : {} + ,'COMMENT_MULTI' : {'{' : '}', '(*':'*)'} + ,'QUOTEMARKS' : {1: '"', 2: "'"} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'constants' : [ + 'Blink', 'Black', 'Blue', 'Green', 'Cyan', 'Red', + 'Magenta', 'Brown', 'LightGray', 'DarkGray', + 'LightBlue', 'LightGreen', 'LightCyan', 'LightRed', + 'LightMagenta', 'Yellow', 'White', 'MaxSIntValue', + 'MaxUIntValue', 'maxint', 'maxLongint', 'maxSmallint', + 'erroraddr', 'errorcode', 'LineEnding' + ] + ,'keywords' : [ + 'in', 'or', 'div', 'mod', 'and', 'shl', 'shr', 'xor', + 'pow', 'is', 'not','Absolute', 'And_then', 'Array', + 'Begin', 'Bindable', 'Case', 'Const', 'Do', 'Downto', + 'Else', 'End', 'Export', 'File', 'For', 'Function', + 'Goto', 'If', 'Import', 'Implementation', 'Inherited', + 'Inline', 'Interface', 'Label', 'Module', 'Nil', + 'Object', 'Of', 'Only', 'Operator', 'Or_else', + 'Otherwise', 'Packed', 'Procedure', 'Program', + 'Protected', 'Qualified', 'Record', 'Repeat', + 'Restricted', 'Set', 'Then', 'To', 'Type', 'Unit', + 'Until', 'Uses', 'Value', 'Var', 'Virtual', 'While', + 'With' + ] + ,'functions' : [ + 'Abs', 'Addr', 'Append', 'Arctan', 'Assert', 'Assign', + 'Assigned', 'BinStr', 'Blockread', 'Blockwrite', + 'Break', 'Chdir', 'Chr', 'Close', 'CompareByte', + 'CompareChar', 'CompareDWord', 'CompareWord', 'Concat', + 'Continue', 'Copy', 'Cos', 'CSeg', 'Dec', 'Delete', + 'Dispose', 'DSeg', 'Eof', 'Eoln', 'Erase', 'Exclude', + 'Exit', 'Exp', 'Filepos', 'Filesize', 'FillByte', + 'Fillchar', 'FillDWord', 'Fillword', 'Flush', 'Frac', + 'Freemem', 'Getdir', 'Getmem', 'GetMemoryManager', + 'Halt', 'HexStr', 'Hi', 'High', 'Inc', 'Include', + 'IndexByte', 'IndexChar', 'IndexDWord', 'IndexWord', + 'Insert', 'IsMemoryManagerSet', 'Int', 'IOresult', + 'Length', 'Ln', 'Lo', 'LongJmp', 'Low', 'Lowercase', + 'Mark', 'Maxavail', 'Memavail', 'Mkdir', 'Move', + 'MoveChar0', 'New', 'Odd', 'OctStr', 'Ofs', 'Ord', + 'Paramcount', 'Paramstr', 'Pi', 'Pos', 'Power', 'Pred', + 'Ptr', 'Random', 'Randomize', 'Read', 'Readln', + 'Real2Double', 'Release', 'Rename', 'Reset', 'Rewrite', + 'Rmdir', 'Round', 'Runerror', 'Seek', 'SeekEof', + 'SeekEoln', 'Seg', 'SetMemoryManager', 'SetJmp', + 'SetLength', 'SetString', 'SetTextBuf', 'Sin', 'SizeOf', + 'Sptr', 'Sqr', 'Sqrt', 'SSeg', 'Str', 'StringOfChar', + 'Succ', 'Swap', 'Trunc', 'Truncate', 'Upcase', 'Val', + 'Write', 'WriteLn' + ] + ,'types' : [ + 'Integer', 'Shortint', 'SmallInt', 'Longint', + 'Longword', 'Int64', 'Byte', 'Word', 'Cardinal', + 'QWord', 'Boolean', 'ByteBool', 'LongBool', 'Char', + 'Real', 'Single', 'Double', 'Extended', 'Comp', + 'String', 'ShortString', 'AnsiString', 'PChar' + ] + } + ,'OPERATORS' :[ + '@', '*', '+', '-', '/', '^', ':=', '<', '=', '>' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + 'specials' : 'color: #EE0000;' + ,'constants' : 'color: #654321;' + ,'keywords' : 'color: #48BDDF;' + ,'functions' : 'color: #449922;' + ,'types' : 'color: #2B60FF;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #60CA00;' + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/perl.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/perl.js new file mode 100644 index 0000000..0313c0c --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/perl.js @@ -0,0 +1,88 @@ +/*************************************************************************** + * (c) 2008 - file created by Christoph Pinkel, MTC Infomedia OHG. + * + * You may choose any license of the current release or any future release + * of editarea to use, modify and/or redistribute this file. + * + * This language specification file supports for syntax checking on + * a large subset of Perl 5.x. + * The basic common syntax of Perl is fully supported, but as for + * the highlighting of built-in operations, it's mainly designed + * to support for hightlighting Perl code in a Safe environment (compartment) + * as used by CoMaNet for evaluation of administrative scripts. This Safe + * compartment basically allows for all of Opcode's :default operations, + * but little others. See http://perldoc.perl.org/Opcode.html to learn + * more. + ***************************************************************************/ + +editAreaLoader.load_syntax["perl"] = { + 'DISPLAY_NAME' : 'Perl', + 'COMMENT_SINGLE' : {1 : '#'}, + 'QUOTEMARKS' : {1: "'", 2: '"'}, + 'KEYWORD_CASE_SENSITIVE' : true, + 'KEYWORDS' : + { + 'core' : + [ "if", "else", "elsif", "while", "for", "each", "foreach", + "next", "last", "goto", "exists", "delete", "undef", + "my", "our", "local", "use", "require", "package", "keys", "values", + "sub", "bless", "ref", "return" ], + 'functions' : + [ + //from :base_core + "int", "hex", "oct", "abs", "substr", "vec", "study", "pos", + "length", "index", "rindex", "ord", "chr", "ucfirst", "lcfirst", + "uc", "lc", "quotemeta", "chop", "chomp", "split", "list", "splice", + "push", "pop", "shift", "unshift", "reverse", "and", "or", "dor", + "xor", "warn", "die", "prototype", + //from :base_mem + "concat", "repeat", "join", "range", + //none from :base_loop, as we'll see them as basic statements... + //from :base_orig + "sprintf", "crypt", "tie", "untie", "select", "localtime", "gmtime", + //others + "print", "open", "close" + ] + }, + 'OPERATORS' : + [ '+', '-', '/', '*', '=', '<', '>', '!', '||', '.', '&&', + ' eq ', ' ne ', '=~' ], + 'DELIMITERS' : + [ '(', ')', '[', ']', '{', '}' ], + 'REGEXPS' : + { + 'packagedecl' : { 'search': '(package )([^ \r\n\t#;]*)()', + 'class' : 'scopingnames', + 'modifiers' : 'g', 'execute' : 'before' }, + 'subdecl' : { 'search': '(sub )([^ \r\n\t#]*)()', + 'class' : 'scopingnames', + 'modifiers' : 'g', 'execute' : 'before' }, + 'scalars' : { 'search': '()(\\\$[a-zA-Z0-9_:]*)()', + 'class' : 'vars', + 'modifiers' : 'g', 'execute' : 'after' }, + 'arrays' : { 'search': '()(@[a-zA-Z0-9_:]*)()', + 'class' : 'vars', + 'modifiers' : 'g', 'execute' : 'after' }, + 'hashs' : { 'search': '()(%[a-zA-Z0-9_:]*)()', + 'class' : 'vars', + 'modifiers' : 'g', 'execute' : 'after' }, + }, + + 'STYLES' : + { + 'COMMENTS': 'color: #AAAAAA;', + 'QUOTESMARKS': 'color: #DC0000;', + 'KEYWORDS' : + { + 'core' : 'color: #8aca00;', + 'functions' : 'color: #2B60FF;' + }, + 'OPERATORS' : 'color: #8aca00;', + 'DELIMITERS' : 'color: #0038E1;', + 'REGEXPS': + { + 'scopingnames' : 'color: #ff0000;', + 'vars' : 'color: #00aaaa;', + } + } //'STYLES' +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/php.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/php.js new file mode 100644 index 0000000..f53dc88 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/php.js @@ -0,0 +1,157 @@ +editAreaLoader.load_syntax["php"] = { + 'DISPLAY_NAME' : 'Php' + ,'COMMENT_SINGLE' : {1 : '//', 2 : '#'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'statements' : [ + 'include', 'require', 'include_once', 'require_once', + 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', + 'endif', 'switch', 'case', 'endswitch', + 'return', 'break', 'continue' + ] + ,'reserved' : [ + '_GET', '_POST', '_SESSION', '_SERVER', '_FILES', '_ENV', '_COOKIE', '_REQUEST', + 'null', '__LINE__', '__FILE__', + 'false', '<?php', '?>', '<?', + '<script language', '</script>', + 'true', 'var', 'default', + 'function', 'class', 'new', '&new', 'this', + '__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION', + 'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR', + 'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR', + 'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT', + 'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE', + 'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR', + 'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL' + + ] + ,'functions' : [ + 'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined', + 'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions', + 'extension_loaded', 'get_extension_funcs', 'debug_backtrace', + 'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv', + 'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime', + 'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar', + 'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown', + 'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate', + 'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode', + 'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat', + 'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from', + 'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport', + 'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die' + + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '%', '!', '&&', '||' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'REGEXPS' : { + // highlight all variables ($...) + 'variables' : { + 'search' : '()(\\$\\w+)()' + ,'class' : 'variables' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #879EFA;' + ,'KEYWORDS' : { + 'reserved' : 'color: #48BDDF;' + ,'functions' : 'color: #0040FD;' + ,'statements' : 'color: #60CA00;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #2B60FF;' + ,'REGEXPS' : { + 'variables' : 'color: #E0BD54;' + } + } + ,'AUTO_COMPLETION' : { + "default": { // the name of this definition group. It's posisble to have different rules inside the same definition file + "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^" // \\s|\\.| + ,"possible_words_letters": "[a-zA-Z0-9_\$]+" + ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$" + ,"prefix_separator": "\\-\\>|\\:\\:" + } + ,"CASE_SENSITIVE": true + ,"MAX_TEXT_LENGTH": 100 // the maximum length of the text being analyzed before the cursor position + ,"KEYWORDS": { + '': [ // the prefix of thoses items + /** + * 0 : the keyword the user is typing + * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous ) + * If empty the keyword will be displayed + * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed) + */ + ['$_POST'] + ,['$_GET'] + ,['$_SESSION'] + ,['$_SERVER'] + ,['$_FILES'] + ,['$_ENV'] + ,['$_COOKIE'] + ,['$_REQUEST'] + // magic methods + ,['__construct', '§( {@} )'] + ,['__destruct', '§( {@} )'] + ,['__sleep', '§( {@} )'] + ,['__wakeup', '§( {@} )'] + ,['__toString', '§( {@} )'] + // include + ,['include', '§ "{@}";'] + ,['include_once', '§ "{@}";'] + ,['require', '§ "{@}";'] + ,['require_once', '§ "{@}";'] + // statements + ,['for', '§( {@} )'] + ,['foreach', '§( {@} )'] + ,['if', '§( {@} )'] + ,['elseif', '§( {@} )'] + ,['while', '§( {@} )'] + ,['switch', '§( {@} )'] + ,['break'] + ,['case'] + ,['continue'] + ,['do'] + ,['else'] + ,['endif'] + ,['endswitch'] + ,['endwhile'] + ,['return'] + // function + ,['unset', '§( {@} )'] + ] + } + } + ,"live": { + + // class NAME: /class\W+([a-z]+)\W+/gi + // method: /^(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi + // static: /^(public|private|protected)?\s+static\s+(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi + // attributes: /(\$this\-\>|(?:var|public|protected|private)\W+\$)([a-z0-9\_]+)(?!\()\b/gi + // v1 : /(\$this\-\>|var\W+|public\W+|protected\W+|private\W+)([a-z0-9\_]+)\W*(=|;)/gi + // var type: /(\$(this\-\>)?[a-z0-9\_]+)\s*\=\s*new\s+([a-z0-9\_])+/gi + + + "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^" // \\s|\\.| + ,"possible_words_letters": "[a-zA-Z0-9_\$]+" + ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$" + ,"prefix_separator": "\\-\\>" + } + ,"CASE_SENSITIVE": true + ,"MAX_TEXT_LENGTH": 100 // the maximum length of the text being analyzed before the cursor position + ,"KEYWORDS": { + '$this': [ // the prefix of thoses items + ['test'] + ] + } + } + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/python.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/python.js new file mode 100644 index 0000000..e9f4314 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/python.js @@ -0,0 +1,145 @@ +/** + * Python syntax v 1.1 + * + * v1.1 by Andre Roberge (2006/12/27) + * +**/ +editAreaLoader.load_syntax["python"] = { + 'DISPLAY_NAME' : 'Python' + ,'COMMENT_SINGLE' : {1 : '#'} + ,'COMMENT_MULTI' : {} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : true + ,'KEYWORDS' : { + /* + ** Set 1: reserved words + ** http://python.org/doc/current/ref/keywords.html + ** Note: 'as' and 'with' have been added starting with Python 2.5 + */ + 'reserved' : [ + 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', + 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', + 'import', 'is', 'in', 'lambda', 'not', 'or', 'pass', 'print', 'raise', + 'return', 'try', 'while', 'with', 'yield' + //the following are *almost* reserved; we'll treat them as such + , 'False', 'True', 'None' + ] + /* + ** Set 2: builtins + ** http://python.org/doc/current/lib/built-in-funcs.html + */ + ,'builtins' : [ + '__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp', + 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', + 'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', + 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals', + 'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range', + 'raw_input', 'reduce', 'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', + 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', + 'vars', 'xrange', 'zip', + // Built-in constants: http://www.python.org/doc/2.4.1/lib/node35.html + //'False', 'True', 'None' have been included in 'reserved' + 'NotImplemented', 'Ellipsis', + // Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html + 'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError', + 'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError', + 'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError', + 'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError', + 'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError', + 'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError', + 'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning', + 'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning', + 'RuntimeWarning', 'FutureWarning', + // we will include the string methods as well + // http://python.org/doc/current/lib/string-methods.html + 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', + 'find', 'index', 'isalnum', 'isaplpha', 'isdigit', 'islower', 'isspace', 'istitle', + 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust', + 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', + 'translate', 'upper', 'zfill' + ] + /* + ** Set 3: standard library + ** http://python.org/doc/current/lib/modindex.html + */ + ,'stdlib' : [ + '__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm', + 'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer', + 'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi', + 'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop', + 'collections', 'colorsys', 'commands', 'compileall', 'compiler', 'compiler', + 'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt', + 'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE', + 'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm', + 'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl', + 'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl', + 'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob', + 'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib', + 'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect', + 'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap', + 'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify', + 'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator', + 'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes', + 'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile', + 'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random', + 're', 'readline', 'repr', 'resource', 'rexec', 'rfc822', 'rgbimg', 'rlcompleter', + 'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve', + 'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd', + 'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string', + 'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev', + 'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios', + 'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token', + 'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2', + 'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings', + 'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml', + 'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib' + + ] + /* + ** Set 4: special methods + ** http://python.org/doc/current/ref/specialnames.html + */ + ,'special' : [ + // Basic customization: http://python.org/doc/current/ref/customization.html + '__new__', '__init__', '__del__', '__repr__', '__str__', + '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__', + '__hash__', '__nonzero__', '__unicode__', '__dict__', + // Attribute access: http://python.org/doc/current/ref/attribute-access.html + '__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__', + '__delete__', '__slots__', + // Class creation, callable objects + '__metaclass__', '__call__', + // Container types: http://python.org/doc/current/ref/sequence-types.html + '__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__', + '__getslice__', '__setslice__', '__delslice__', + // Numeric types: http://python.org/doc/current/ref/numeric-types.html + '__abs__','__add__','__and__','__coerce__','__div__','__divmod__','__float__', + '__hex__','__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__', + '__ior__','__ixor__', '__ilshift__','__irshift__','__invert__','__int__', + '__long__','__lshift__', + '__mod__','__mul__','__neg__','__oct__','__or__','__pos__','__pow__', + '__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__', + '__rshift__','__rsub__','__rmul__','__repr__','__rand__','__rxor__','__ror__', + '__sub__','__xor__' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ',' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #660066;' + ,'KEYWORDS' : { + 'reserved' : 'color: #0000FF;' + ,'builtins' : 'color: #009900;' + ,'stdlib' : 'color: #009900;' + ,'special': 'color: #006666;' + } + ,'OPERATORS' : 'color: #993300;' + ,'DELIMITERS' : 'color: #993300;' + + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/robotstxt.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/robotstxt.js new file mode 100644 index 0000000..5bca8fe --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/robotstxt.js @@ -0,0 +1,25 @@ +editAreaLoader.load_syntax["robotstxt"] = { + 'DISPLAY_NAME' : 'Robots txt', + 'COMMENT_SINGLE' : {1 : '#'}, + 'COMMENT_MULTI' : {}, + 'QUOTEMARKS' : [], + 'KEYWORD_CASE_SENSITIVE' : false, + 'KEYWORDS' : { + 'attributes' : ['User-agent', 'Disallow', 'Allow', 'Crawl-delay'], + 'values' : ['*'], + 'specials' : ['*'] + }, + 'OPERATORS' :[':'], + 'DELIMITERS' :[], + 'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;', + 'QUOTESMARKS': 'color: #6381F8;', + 'KEYWORDS' : { + 'attributes' : 'color: #48BDDF;', + 'values' : 'color: #2B60FF;', + 'specials' : 'color: #FF0000;' + }, + 'OPERATORS' : 'color: #FF00FF;', + 'DELIMITERS' : 'color: #60CA00;' + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/ruby.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/ruby.js new file mode 100644 index 0000000..2049cf5 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/ruby.js @@ -0,0 +1,68 @@ +/** + * Ruby syntax v 1.0 + * + * v1.0 by Patrice De Saint Steban (2007/01/03) + * +**/ +editAreaLoader.load_syntax["ruby"] = { + 'DISPLAY_NAME' : 'Ruby' + ,'COMMENT_SINGLE' : {1 : '#'} + ,'COMMENT_MULTI' : {} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : true + ,'KEYWORDS' : { + 'reserved' : [ + 'alias', 'and', 'BEGIN', 'begin', 'break', 'case', 'class', 'def', 'defined', 'do', 'else', + 'elsif', 'END', 'end', 'ensure', 'false', 'for', 'if', + 'in', 'module', 'next', 'not', 'or', 'redo', 'rescue', 'retry', + 'return', 'self', 'super', 'then', 'true', 'undef', 'unless', 'until', 'when', 'while', 'yield' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ',' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'REGEXPS' : { + 'constants' : { + 'search' : '()([A-Z]\\w*)()' + ,'class' : 'constants' + ,'modifiers' : 'g' + ,'execute' : 'before' + } + ,'variables' : { + 'search' : '()([\$\@\%]+\\w+)()' + ,'class' : 'variables' + ,'modifiers' : 'g' + ,'execute' : 'before' + } + ,'numbers' : { + 'search' : '()(-?[0-9]+)()' + ,'class' : 'numbers' + ,'modifiers' : 'g' + ,'execute' : 'before' + } + ,'symbols' : { + 'search' : '()(:\\w+)()' + ,'class' : 'symbols' + ,'modifiers' : 'g' + ,'execute' : 'before' + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #660066;' + ,'KEYWORDS' : { + 'reserved' : 'font-weight: bold; color: #0000FF;' + } + ,'OPERATORS' : 'color: #993300;' + ,'DELIMITERS' : 'color: #993300;' + ,'REGEXPS' : { + 'variables' : 'color: #E0BD54;' + ,'numbers' : 'color: green;' + ,'constants' : 'color: #00AA00;' + ,'symbols' : 'color: #879EFA;' + } + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/sql.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/sql.js new file mode 100644 index 0000000..2f6dbda --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/sql.js @@ -0,0 +1,56 @@ +editAreaLoader.load_syntax["sql"] = { + 'DISPLAY_NAME' : 'SQL' + ,'COMMENT_SINGLE' : {1 : '--'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : {1: "'", 2: '"', 3: '`'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'statements' : [ + 'select', 'SELECT', 'where', 'order', 'by', + 'insert', 'from', 'update', 'grant', 'left join', 'right join', + 'union', 'group', 'having', 'limit', 'alter', 'LIKE','IN','CASE' + ] + ,'reserved' : [ + 'null', 'enum', 'int', 'boolean', 'add', 'varchar' + + ] + ,'functions' : [ + 'ABS','ACOS','ADDDATE','ADDTIME','AES_DECRYPT','AES_ENCRYPT','ASCII','ASIN','ATAN2 ATAN','ATAN','AVG','BENCHMARK','DISTINCT','BIN','BIT_AND','BIT_COUNT','BIT_LENGTH','BIT_OR','BIT_XOR','CAST','CEILING CEIL','CHAR_LENGTH','CHAR', +'CHARACTER_LENGTH','CHARSET','COALESCE','COERCIBILITY','COLLATION','COMPRESS','CONCAT_WS','CONCAT','CONNECTION_ID','CONV','CONVERT_TZ','COS','COT','COUNT','CRC32','CURDATE','CURRENT_DATE','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER','CURTIME','DATABASE','DATE_ADD','DATE_FORMAT','DATE_SUB','DATE','DATEDIFF','DAY','DAYNAME','DAYOFMONTH', +'DAYOFWEEK','DAYOFYEAR','DECODE','DEFAULT','DEGREES','DES_DECRYPT','DES_ENCRYPT','ELT','ENCODE','ENCRYPT','EXP','EXPORT_SET','EXTRACT','FIELD','FIND_IN_SET','FLOOR','FORMAT','FOUND_ROWS','FROM_DAYS','FROM_UNIXTIME','GET_FORMAT','GET_LOCK','GREATEST','GROUP_CONCAT','HEX','HOUR','IF','IFNULL','INET_ATON','INET_NTOA', +'INSERT','INSTR','INTERVAL','IS_FREE_LOCK','IS_USED_LOCK','ISNULL','LAST_DAY','LAST_INSERT_ID','LCASE','LEAST','LEFT','LENGTH','LN','LOAD_FILE','LOCALTIME','LOCALTIMESTAMP','LOCATE','LOG10','LOG2','LOG','LOWER','LPAD','LTRIM','MAKE_SET','MAKEDATE','MAKETIME','MASTER_POS_WAIT','MAX','MD5','MICROSECOND', +'MID','MIN','MINUTE','MOD','MONTH','MONTHNAME','NOW','NULLIF','OCT','OCTET_LENGTH','OLD_PASSWORD','ORD','PASSWORD','PERIOD_ADD','PERIOD_DIFF','PI','POSITION','POW','POWER','PROCEDURE ANALYSE','QUARTER','QUOTE','RADIANS','RAND','RELEASE_LOCK','REPEAT','REPLACE','REVERSE','RIGHT','ROUND', +'RPAD','RTRIM','SEC_TO_TIME','SECOND','SESSION_USER','SHA1','SHA','SIGN','SIN','SOUNDEX','SOUNDS LIKE','SPACE','SQRT','STD','STDDEV','STR_TO_DATE','STRCMP','SUBDATE','SUBSTRING_INDEX','SUBSTRING','SUBSTR','SUBTIME','SUM','SYSDATE','SYSTEM_USER','TAN','TIME_FORMAT','TIME_TO_SEC','TIME','TIMEDIFF', +'TIMESTAMP','TO_DAYS','TRIM','TRUNCATE','UCASE','UNCOMPRESS','UNCOMPRESSED_LENGTH','UNHEX','UNIX_TIMESTAMP','UPPER','USER','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','UUID','VALUES','VARIANCE','WEEK','WEEKDAY','WEEKOFYEAR','YEAR','YEARWEEK' + ] + } + ,'OPERATORS' :[ + 'AND','&&','BETWEEN','BINARY','&','|','^','/','DIV','<=>','=','>=','>','<<','>>','IS','NULL','<=','<','-','%','!=','<>','!','||','OR','+','REGEXP','RLIKE','XOR','~','*' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'REGEXPS' : { + // highlight all variables (@...) + 'variables' : { + 'search' : '()(\\@\\w+)()' + ,'class' : 'variables' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #879EFA;' + ,'KEYWORDS' : { + 'reserved' : 'color: #48BDDF;' + ,'functions' : 'color: #0040FD;' + ,'statements' : 'color: #60CA00;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #2B60FF;' + ,'REGEXPS' : { + 'variables' : 'color: #E0BD54;' + } + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/tsql.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/tsql.js new file mode 100644 index 0000000..2da6464 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/tsql.js @@ -0,0 +1,88 @@ +editAreaLoader.load_syntax["tsql"] = { + 'DISPLAY_NAME' : 'T-SQL' + ,'COMMENT_SINGLE' : {1 : '--'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : {1: "'" } + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'statements': [ + 'ADD', 'EXCEPT', 'PERCENT', 'EXEC', 'PLAN', 'ALTER', 'EXECUTE', 'PRECISION', + 'PRIMARY', 'EXIT', 'PRINT', 'AS', 'FETCH', 'PROC', 'ASC', + 'FILE', 'PROCEDURE', 'AUTHORIZATION', 'FILLFACTOR', 'PUBLIC', 'BACKUP', 'FOR', 'RAISERROR', + 'BEGIN', 'FOREIGN', 'READ', 'FREETEXT', 'READTEXT', 'BREAK', 'FREETEXTTABLE', + 'RECONFIGURE', 'BROWSE', 'FROM', 'REFERENCES', 'BULK', 'FULL', 'REPLICATION', 'BY', + 'FUNCTION', 'RESTORE', 'CASCADE', 'GOTO', 'RESTRICT', 'CASE', 'GRANT', 'RETURN', + 'CHECK', 'GROUP', 'REVOKE', 'CHECKPOINT', 'HAVING', 'RIGHT', 'CLOSE', 'HOLDLOCK', 'ROLLBACK', + 'CLUSTERED', 'IDENTITY', 'ROWCOUNT', 'IDENTITY_INSERT', 'ROWGUIDCOL', 'COLLATE', + 'IDENTITYCOL', 'RULE', 'COLUMN', 'IF', 'SAVE', 'COMMIT', 'SCHEMA', 'COMPUTE', 'INDEX', + 'SELECT', 'CONSTRAINT', 'CONTAINS', 'INSERT', 'SET', + 'CONTAINSTABLE', 'INTERSECT', 'SETUSER', 'CONTINUE', 'INTO', 'SHUTDOWN', 'SOME', + 'CREATE', 'STATISTICS', 'KEY', 'CURRENT', 'KILL', 'TABLE', + 'CURRENT_DATE', 'TEXTSIZE', 'CURRENT_TIME', 'THEN', 'LINENO', + 'TO', 'LOAD', 'TOP', 'CURSOR', 'NATIONAL', 'TRAN', 'DATABASE', 'NOCHECK', + 'TRANSACTION', 'DBCC', 'NONCLUSTERED', 'TRIGGER', 'DEALLOCATE', 'TRUNCATE', + 'DECLARE', 'TSEQUAL', 'DEFAULT', 'UNION', 'DELETE', 'OF', 'UNIQUE', + 'DENY', 'OFF', 'UPDATE', 'DESC', 'OFFSETS', 'UPDATETEXT', 'DISK', 'ON', 'USE', 'DISTINCT', 'OPEN', + 'DISTRIBUTED', 'OPENDATASOURCE', 'VALUES', 'DOUBLE', 'OPENQUERY', 'VARYING', 'DROP', + 'OPENROWSET', 'VIEW', 'DUMMY', 'OPENXML', 'WAITFOR', 'DUMP', 'OPTION', 'WHEN', 'ELSE', 'WHERE', + 'END', 'ORDER', 'WHILE', 'ERRLVL', 'WITH', 'ESCAPE', 'OVER', 'WRITETEXT' + ], + 'functions': [ + 'COALESCE', 'SESSION_USER', 'CONVERT', 'SYSTEM_USER', 'CURRENT_TIMESTAMP', 'CURRENT_USER', 'NULLIF', 'USER', + 'AVG', 'MIN', 'CHECKSUM', 'SUM', 'CHECKSUM_AGG', 'STDEV', 'COUNT', 'STDEVP', 'COUNT_BIG', 'VAR', 'GROUPING', 'VARP', 'MAX', + '@@DATEFIRST', '@@OPTIONS', '@@DBTS', '@@REMSERVER', '@@LANGID', '@@SERVERNAME', '@@LANGUAGE', '@@SERVICENAME', '@@LOCK_TIMEOUT', + '@@SPID', '@@MAX_CONNECTIONS', '@@TEXTSIZE', '@@MAX_PRECISION', '@@VERSION', '@@NESTLEVEL', + '@@CURSOR_ROWS', 'CURSOR_STATUS', '@@FETCH_STATUS', + 'DATEADD', 'DATEDIFF', 'DATENAME', 'DATEPART', 'DAY', 'GETDATE', 'GETUTCDATE', 'MONTH', 'YEAR', + 'ABS', 'DEGREES', 'RAND', 'ACOS', 'EXP', 'ROUND', 'ASIN', 'FLOOR', 'SIGN', 'ATAN', 'LOG', 'SIN', 'ATN2', 'LOG10', 'SQRT', + 'CEILING', 'PI ', 'SQUARE', 'COS', 'POWER', 'TAN', 'COT', 'RADIANS', + '@@PROCID', 'COL_LENGTH', 'FULLTEXTCATALOGPROPERTY', 'COL_NAME', 'FULLTEXTSERVICEPROPERTY', 'COLUMNPROPERTY', 'INDEX_COL', + 'DATABASEPROPERTY', 'INDEXKEY_PROPERTY', 'DATABASEPROPERTYEX', 'INDEXPROPERTY', 'DB_ID', 'OBJECT_ID', 'DB_NAME', 'OBJECT_NAME', + 'FILE_ID', 'OBJECTPROPERTY', 'OBJECTPROPERTYEX', 'FILE_NAME', 'SQL_VARIANT_PROPERTY', 'FILEGROUP_ID', 'FILEGROUP_NAME', + 'FILEGROUPPROPERTY', 'TYPEPROPERTY', 'FILEPROPERTY', + 'CURRENT_USER', 'SUSER_ID', 'SUSER_SID', 'IS_MEMBER', 'SUSER_SNAME', 'IS_SRVROLEMEMBER', 'PERMISSIONS', 'SYSTEM_USER', + 'SUSER_NAME', 'USER_ID', 'SESSION_USER', 'USER_NAME', 'ASCII', 'SOUNDEX', 'PATINDEX', 'SPACE', 'CHARINDEX', 'QUOTENAME', + 'STR', 'DIFFERENCE', 'REPLACE', 'STUFF', 'REPLICATE', 'SUBSTRING', 'LEN', 'REVERSE', 'UNICODE', 'LOWER', + 'UPPER', 'LTRIM', 'RTRIM', 'APP_NAME', 'CAST', 'CONVERT', 'COALESCE', 'COLLATIONPROPERTY', 'COLUMNS_UPDATED', 'CURRENT_TIMESTAMP', + 'CURRENT_USER', 'DATALENGTH', '@@ERROR', 'FORMATMESSAGE', 'GETANSINULL', 'HOST_ID', 'HOST_NAME', 'IDENT_CURRENT', 'IDENT_INCR', + 'IDENT_SEED', '@@IDENTITY', 'ISDATE', 'ISNULL', 'ISNUMERIC', 'NEWID', 'NULLIF', 'PARSENAME', '@@ROWCOUNT', + 'SCOPE_IDENTITY', 'SERVERPROPERTY', 'SESSIONPROPERTY', 'SESSION_USER', 'STATS_DATE', 'SYSTEM_USER', '@@TRANCOUNT', 'USER_NAME', + '@@CONNECTIONS', '@@PACK_RECEIVED', '@@CPU_BUSY', '@@PACK_SENT', '@@TIMETICKS', '@@IDLE', '@@TOTAL_ERRORS', '@@IO_BUSY', '@@TOTAL_READ', + '@@PACKET_ERRORS', '@@TOTAL_WRITE', 'PATINDEX', 'TEXTVALID', 'TEXTPTR' + ], + 'reserved': [ + 'RIGHT', 'INNER', 'IS', 'JOIN', 'CROSS', 'LEFT', 'NULL', 'OUTER' + ] + } + ,'OPERATORS' :[ + '+', '-', '*', '/', '%', '=', '&' ,'|', '^', '>', '<', '>=', '<=', '<>', '!=', '!<', '!>', 'ALL', 'AND', 'ANY', 'BETWEEN', 'EXISTS', 'IN', 'LIKE', 'NOT', 'OR', '~' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'REGEXPS' : { + // highlight all variables (@...) + 'variables' : { + 'search' : '()(\\@\\w+)()' + ,'class' : 'variables' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #008000;' + ,'QUOTESMARKS': 'color: #FF0000;' + ,'KEYWORDS' : { + 'reserved' : 'color: #808080;' + ,'functions' : 'color: #FF00FF;' + ,'statements' : 'color: #0000FF;' + } + ,'OPERATORS' : 'color: #808080;' + ,'DELIMITERS' : 'color: #FF8000;' + ,'REGEXPS' : { + 'variables' : 'color: #E0BD54;' + } + } +}; + + diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/vb.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/vb.js new file mode 100644 index 0000000..6af501f --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/vb.js @@ -0,0 +1,53 @@ +editAreaLoader.load_syntax["vb"] = { + 'DISPLAY_NAME' : 'Visual Basic' + ,'COMMENT_SINGLE' : {1 : "'"} + ,'COMMENT_MULTI' : { } + ,'QUOTEMARKS' : {1: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'statements' : [ + 'if','then','for','each','while','do','loop', + 'else','elseif','select','case','end select', + 'until','next','step','to','in','end if' + ] + ,'keywords' : [ + 'empty','isempty','nothing','null','isnull','true','false', + 'set','call', + 'sub','end sub','function','end function','exit','exit function', + 'dim','Mod','In','private','public','shared','const' + ] + + ,'functions' : [ + 'CDate','Date','DateAdd','DateDiff','DatePart','DateSerial','DateValue','Day','FormatDateTime', + 'Hour','IsDate','Minute','Month', + 'MonthName','Now','Second','Time','Timer','TimeSerial','TimeValue','Weekday','WeekdayName ','Year', + 'Asc','CBool','CByte','CCur','CDate','CDbl','Chr','CInt','CLng','CSng','CStr','Hex','Oct','FormatCurrency', + 'FormatDateTime','FormatNumber','FormatPercent','Abs','Atn','Cos','Exp','Hex','Int','Fix','Log','Oct', + 'Rnd','Sgn','Sin','Sqr','Tan', + 'Array','Filter','IsArray','Join','LBound','Split','UBound', + 'InStr','InStrRev','LCase','Left','Len','LTrim','RTrim','Trim','Mid','Replace','Right','Space','StrComp', + 'String','StrReverse','UCase', + 'CreateObject','Eval','GetLocale','GetObject','GetRef','InputBox','IsEmpty','IsNull','IsNumeric', + 'IsObject','LoadPicture','MsgBox','RGB','Round','ScriptEngine','ScriptEngineBuildVersion','ScriptEngineMajorVersion', + 'ScriptEngineMinorVersion','SetLocale','TypeName','VarType' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '!', '&' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #99CC00;' + ,'QUOTESMARKS': 'color: #333399;' + ,'KEYWORDS' : { + 'keywords' : 'color: #3366FF;' + ,'functions' : 'color: #0000FF;' + ,'statements' : 'color: #3366FF;' + } + ,'OPERATORS' : 'color: #FF0000;' + ,'DELIMITERS' : 'color: #0000FF;' + + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/xml.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/xml.js new file mode 100644 index 0000000..074d888 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/xml.js @@ -0,0 +1,57 @@ +/* +* last update: 2006-08-24 +*/ + +editAreaLoader.load_syntax["xml"] = { + 'DISPLAY_NAME' : 'XML' + ,'COMMENT_SINGLE' : {} + ,'COMMENT_MULTI' : {''} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + } + ,'OPERATORS' :[ + ] + ,'DELIMITERS' :[ + ] + ,'REGEXPS' : { + 'xml' : { + 'search' : '()(<\\?[^>]*?\\?>)()' + ,'class' : 'xml' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + ,'cdatas' : { + 'search' : '()()()' + ,'class' : 'cdata' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + ,'tags' : { + 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)' + ,'class' : 'tags' + ,'modifiers' : 'gi' + ,'execute' : 'before' // before or after + } + ,'attributes' : { + 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)' + ,'class' : 'attributes' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + } + ,'OPERATORS' : 'color: #E775F0;' + ,'DELIMITERS' : '' + ,'REGEXPS' : { + 'attributes': 'color: #B1AC41;' + ,'tags': 'color: #E62253;' + ,'xml': 'color: #8DCFB5;' + ,'cdata': 'color: #50B020;' + } + } +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/fileMenu.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/fileMenu.js new file mode 100644 index 0000000..0c94f96 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/fileMenu.js @@ -0,0 +1,146 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +/*global define,jQuery,window */ + +(function(factory) { + + "use strict"; + + if (typeof (define) === 'function' && define.amd) { + define([ 'jquery' ], factory); + } else { + factory(jQuery); + } +}(function($) { + + "use strict"; + + $.fileMenu = function(el, options) { + + var base = this; + + base.$el = $(el); + base.el = el; + + base.options = $.extend({}, $.fileMenu.defaultOptions, options); + base.touch = false; + + base.$ = function(query) { + return base.$el.find(query); + }; + + base.hideMenu = function() { + base.$('.selected ul').slideUp(base.options.slideSpeed); + base.$('.selected').removeClass('selected'); + base.$el.removeClass('active'); + }; + + base.showMenu = function($this) { + var $parent = $this.parent(), $menu = $this.children('ul').first(), offsets = $this.offset(); + + $parent.addClass('active'); + + $this.addClass('selected'); + $menu.css({ + 'left' : offsets.left, + 'top' : offsets.top + $parent.height() + }); + $menu.slideDown(base.options.slideSpeed); + }; + + base.addListeners = function() { + base.$el.children('li').on('click', function(e) { + var $this = $(this); + + if ($this.hasClass('selected')) { + base.hideMenu(); + } else { + base.hideMenu(); + base.showMenu($this); + } + e.stopPropagation(); + }); + + base.$el.children('li').on('mouseenter', function() { + var $this = $(this); + if (!$this.parent().hasClass('active')) { + return; + } + if ($this.hasClass('selected')) { + return; + } + + base.hideMenu(); + base.showMenu($this); + }); + + /* Don't slide up if submenu, divider or disabled item is clicked */ + base.$('ul').on('click', function(e) { + var $this = $(e.target); + if ($this.get(0).tagName === 'LI' && !$this.hasClass('sub')) { + return; + } + e.stopPropagation(); + }); + + /* Handle toggle elements */ + base.$('ul').on('click', '.toggle', function(e) { + $(this).toggleClass('active'); + e.stopPropagation(); + }); + + /* Position sub menus */ + base.$el.on('mouseenter', 'ul li', function() { + var $this = $(this); + + $this.find('ul').first().css({ + 'left' : $this.parent().width(), + 'margin-top' : -$this.height() + }); + }); + + /* Hide menu on click outside the menu */ + $('html').on('click', function() { + base.hideMenu(); + }); + }; + + base.init = function() { + base.addListeners(); + base.$el.addClass('fileMenu'); + + }; + + base.init(); + }; + + $.fileMenu.defaultOptions = { + slideSpeed : 100 + }; + + $.fn.fileMenu = function(options) { + return this.each(function() { + var fm = new $.fileMenu(this, options); + }); + }; + +})); \ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/AUTHORS.txt b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/AUTHORS.txt new file mode 100644 index 0000000..2f54e1b --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/AUTHORS.txt @@ -0,0 +1,337 @@ +# ! jQuery UI - v1.12.1 - 2016-09-14 +# http://jqueryui.com +# Copyright jQuery Foundation and other contributors; Licensed MIT */ + +Authors ordered by first contribution +A list of current team members is available at http://jqueryui.com/about + +Paul Bakaus +Richard Worth +Yehuda Katz +Sean Catchpole +John Resig +Tane Piper +Dmitri Gaskin +Klaus Hartl +Stefan Petre +Gilles van den Hoven +Micheil Bryan Smith +Jörn Zaefferer +Marc Grabanski +Keith Wood +Brandon Aaron +Scott González +Eduardo Lundgren +Aaron Eisenberger +Joan Piedra +Bruno Basto +Remy Sharp +Bohdan Ganicky +David Bolter +Chi Cheng +Ca-Phun Ung +Ariel Flesler +Maggie Wachs +Scott Jehl +Todd Parker +Andrew Powell +Brant Burnett +Douglas Neiner +Paul Irish +Ralph Whitbeck +Thibault Duplessis +Dominique Vincent +Jack Hsu +Adam Sontag +Carl Fürstenberg +Kevin Dalman +Alberto Fernández Capel +Jacek Jędrzejewski (http://jacek.jedrzejewski.name) +Ting Kuei +Samuel Cormier-Iijima +Jon Palmer +Ben Hollis +Justin MacCarthy +Eyal Kobrigo +Tiago Freire +Diego Tres +Holger Rüprich +Ziling Zhao +Mike Alsup +Robson Braga Araujo +Pierre-Henri Ausseil +Christopher McCulloh +Andrew Newcomb +Lim Chee Aun +Jorge Barreiro +Daniel Steigerwald +John Firebaugh +John Enters +Andrey Kapitcyn +Dmitry Petrov +Eric Hynds +Chairat Sunthornwiphat +Josh Varner +Stéphane Raimbault +Jay Merrifield +J. Ryan Stinnett +Peter Heiberg +Alex Dovenmuehle +Jamie Gegerson +Raymond Schwartz +Phillip Barnes +Kyle Wilkinson +Khaled AlHourani +Marian Rudzynski +Jean-Francois Remy +Doug Blood +Filippo Cavallarin +Heiko Henning +Aliaksandr Rahalevich +Mario Visic +Xavi Ramirez +Max Schnur +Saji Nediyanchath +Corey Frang +Aaron Peterson +Ivan Peters +Mohamed Cherif Bouchelaghem +Marcos Sousa +Michael DellaNoce +George Marshall +Tobias Brunner +Martin Solli +David Petersen +Dan Heberden +William Kevin Manire +Gilmore Davidson +Michael Wu +Adam Parod +Guillaume Gautreau +Marcel Toele +Dan Streetman +Matt Hoskins +Giovanni Giacobbi +Kyle Florence +Pavol Hluchý +Hans Hillen +Mark Johnson +Trey Hunner +Shane Whittet +Edward A Faulkner +Adam Baratz +Kato Kazuyoshi +Eike Send +Kris Borchers +Eddie Monge +Israel Tsadok +Carson McDonald +Jason Davies +Garrison Locke +David Murdoch +Benjamin Scott Boyle +Jesse Baird +Jonathan Vingiano +Dylan Just +Hiroshi Tomita +Glenn Goodrich +Tarafder Ashek-E-Elahi +Ryan Neufeld +Marc Neuwirth +Philip Graham +Benjamin Sterling +Wesley Walser +Kouhei Sutou +Karl Kirch +Chris Kelly +Jason Oster +Felix Nagel +Alexander Polomoshnov +David Leal +Igor Milla +Dave Methvin +Florian Gutmann +Marwan Al Jubeh +Milan Broum +Sebastian Sauer +Gaëtan Muller +Michel Weimerskirch +William Griffiths +Stojce Slavkovski +David Soms +David De Sloovere +Michael P. Jung +Shannon Pekary +Dan Wellman +Matthew Edward Hutton +James Khoury +Rob Loach +Alberto Monteiro +Alex Rhea +Krzysztof Rosiński +Ryan Olton +Genie <386@mail.com> +Rick Waldron +Ian Simpson +Lev Kitsis +TJ VanToll +Justin Domnitz +Douglas Cerna +Bert ter Heide +Jasvir Nagra +Yuriy Khabarov <13real008@gmail.com> +Harri Kilpiö +Lado Lomidze +Amir E. Aharoni +Simon Sattes +Jo Liss +Guntupalli Karunakar +Shahyar Ghobadpour +Lukasz Lipinski +Timo Tijhof +Jason Moon +Martin Frost +Eneko Illarramendi +EungJun Yi +Courtland Allen +Viktar Varvanovich +Danny Trunk +Pavel Stetina +Michael Stay +Steven Roussey +Michael Hollis +Lee Rowlands +Timmy Willison +Karl Swedberg +Baoju Yuan +Maciej Mroziński +Luis Dalmolin +Mark Aaron Shirley +Martin Hoch +Jiayi Yang +Philipp Benjamin Köppchen +Sindre Sorhus +Bernhard Sirlinger +Jared A. Scheel +Rafael Xavier de Souza +John Chen +Robert Beuligmann +Dale Kocian +Mike Sherov +Andrew Couch +Marc-Andre Lafortune +Nate Eagle +David Souther +Mathias Stenbom +Sergey Kartashov +Avinash R +Ethan Romba +Cory Gackenheimer +Juan Pablo Kaniefsky +Roman Salnikov +Anika Henke +Samuel Bovée +Fabrício Matté +Viktor Kojouharov +Pawel Maruszczyk (http://hrabstwo.net) +Pavel Selitskas +Bjørn Johansen +Matthieu Penant +Dominic Barnes +David Sullivan +Thomas Jaggi +Vahid Sohrabloo +Travis Carden +Bruno M. Custódio +Nathanael Silverman +Christian Wenz +Steve Urmston +Zaven Muradyan +Woody Gilk +Zbigniew Motyka +Suhail Alkowaileet +Toshi MARUYAMA +David Hansen +Brian Grinstead +Christian Klammer +Steven Luscher +Gan Eng Chin +Gabriel Schulhof +Alexander Schmitz +Vilhjálmur Skúlason +Siebrand Mazeland +Mohsen Ekhtiari +Pere Orga +Jasper de Groot +Stephane Deschamps +Jyoti Deka +Andrei Picus +Ondrej Novy +Jacob McCutcheon +Monika Piotrowicz +Imants Horsts +Eric Dahl +Dave Stein +Dylan Barrell +Daniel DeGroff +Michael Wiencek +Thomas Meyer +Ruslan Yakhyaev +Brian J. Dowling +Ben Higgins +Yermo Lamers +Patrick Stapleton +Trisha Crowley +Usman Akeju +Rodrigo Menezes +Jacques Perrault +Frederik Elvhage +Will Holley +Uri Gilad +Richard Gibson +Simen Bekkhus +Chen Eshchar +Bruno Pérel +Mohammed Alshehri +Lisa Seacat DeLuca +Anne-Gaelle Colom +Adam Foster +Luke Page +Daniel Owens +Michael Orchard +Marcus Warren +Nils Heuermann +Marco Ziech +Patricia Juarez +Ben Mosher +Ablay Keldibek +Thomas Applencourt +Jiabao Wu +Eric Lee Carraway +Victor Homyakov +Myeongjin Lee +Liran Sharir +Weston Ruter +Mani Mishra +Hannah Methvin +Leonardo Balter +Benjamin Albert +Michał Gołębiowski +Alyosha Pushak +Fahad Ahmad +Matt Brundage +Francesc Baeta +Piotr Baran +Mukul Hase +Konstantin Dinev +Rand Scullard +Dan Strohl +Maksim Ryzhikov +Amine HADDAD +Amanpreet Singh +Alexey Balchunas +Peter Kehl +Peter Dave Hello +Johannes Schäfer +Ville Skyttä +Ryan Oriecuia diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/LICENSE.txt b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/LICENSE.txt new file mode 100644 index 0000000..4819e54 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/LICENSE.txt @@ -0,0 +1,43 @@ +Copyright jQuery Foundation and other contributors, https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-ui + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code contained within the demos directory. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/external/jquery/jquery.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/external/jquery/jquery.js new file mode 100644 index 0000000..a1c07fd --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/external/jquery/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0 + + + + + + jQuery UI Example Page + + + + + +

Welcome to jQuery UI!

+ +
+

This page demonstrates the widgets and theme you selected in Download Builder. Please make sure you are using them with a compatible jQuery version.

+
+ +

YOUR COMPONENTS:

+ + + +

Accordion

+
+

First

+
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
+

Second

+
Phasellus mattis tincidunt nibh.
+

Third

+
Nam dui erat, auctor a, dignissim quis.
+
+ + + + +

Autocomplete

+
+ +
+ + + + +

Button

+ + + + + + +

Checkboxradio

+
+
+ + + +
+
+ + + + +

Controlgroup

+
+ Rental Car +
+ + + + + + + + + + +
+
+ + + + +

Tabs

+
+ +
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+
Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.
+
Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.
+
+ + + +

Dialog

+

+ +

+ +

Overlay and Shadow Classes

+
+

Lorem ipsum dolor sit amet, Nulla nec tortor. Donec id elit quis purus consectetur consequat.

Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci.

Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat.

Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam.

Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante.

Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi.

+ + +
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +
+ +
+ + +
+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

+
+ + + +

Framework Icons (content color preview)

+
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+ + + +

Slider

+
+ + + + +

Datepicker

+
+ + + + +

Progressbar

+
+ + + + +

Selectmenu

+ + + + + +

Spinner

+ + + + + +

Menu

+ + + + + +

Tooltip

+

+ Tooltips can be attached to any element. When you hover +the element with your mouse, the title attribute is displayed in a little box next to the element, just like a native tooltip. +

+ + + +

Highlight / Error

+
+
+

+ Hey! Sample ui-state-highlight style.

+
+
+
+
+
+

+ Alert: Sample ui-state-error style.

+
+
+ + + + + + diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.css new file mode 100644 index 0000000..e73a29b --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.css @@ -0,0 +1,1312 @@ +/*! jQuery UI - v1.12.1 - 2016-09-14 +* http://jqueryui.com +* Includes: core.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, draggable.css, resizable.css, progressbar.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?bgShadowXPos=&bgOverlayXPos=&bgErrorXPos=&bgHighlightXPos=&bgContentXPos=&bgHeaderXPos=&bgActiveXPos=&bgHoverXPos=&bgDefaultXPos=&bgShadowYPos=&bgOverlayYPos=&bgErrorYPos=&bgHighlightYPos=&bgContentYPos=&bgHeaderYPos=&bgActiveYPos=&bgHoverYPos=&bgDefaultYPos=&bgShadowRepeat=&bgOverlayRepeat=&bgErrorRepeat=&bgHighlightRepeat=&bgContentRepeat=&bgHeaderRepeat=&bgActiveRepeat=&bgHoverRepeat=&bgDefaultRepeat=&iconsHover=url(%22images%2Fui-icons_555555_256x240.png%22)&iconsHighlight=url(%22images%2Fui-icons_777620_256x240.png%22)&iconsHeader=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsError=url(%22images%2Fui-icons_cc0000_256x240.png%22)&iconsDefault=url(%22images%2Fui-icons_777777_256x240.png%22)&iconsContent=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsActive=url(%22images%2Fui-icons_ffffff_256x240.png%22)&bgImgUrlShadow=&bgImgUrlOverlay=&bgImgUrlHover=&bgImgUrlHighlight=&bgImgUrlHeader=&bgImgUrlError=&bgImgUrlDefault=&bgImgUrlContent=&bgImgUrlActive=&opacityFilterShadow=Alpha(Opacity%3D30)&opacityFilterOverlay=Alpha(Opacity%3D30)&opacityShadowPerc=30&opacityOverlayPerc=30&iconColorHover=%23555555&iconColorHighlight=%23777620&iconColorHeader=%23444444&iconColorError=%23cc0000&iconColorDefault=%23777777&iconColorContent=%23444444&iconColorActive=%23ffffff&bgImgOpacityShadow=0&bgImgOpacityOverlay=0&bgImgOpacityError=95&bgImgOpacityHighlight=55&bgImgOpacityContent=75&bgImgOpacityHeader=75&bgImgOpacityActive=65&bgImgOpacityHover=75&bgImgOpacityDefault=75&bgTextureShadow=flat&bgTextureOverlay=flat&bgTextureError=flat&bgTextureHighlight=flat&bgTextureContent=flat&bgTextureHeader=flat&bgTextureActive=flat&bgTextureHover=flat&bgTextureDefault=flat&cornerRadius=3px&fwDefault=normal&ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&cornerRadiusShadow=8px&thicknessShadow=5px&offsetLeftShadow=0px&offsetTopShadow=0px&opacityShadow=.3&bgColorShadow=%23666666&opacityOverlay=.3&bgColorOverlay=%23aaaaaa&fcError=%235f3f3f&borderColorError=%23f1a899&bgColorError=%23fddfdf&fcHighlight=%23777620&borderColorHighlight=%23dad55e&bgColorHighlight=%23fffa90&fcContent=%23333333&borderColorContent=%23dddddd&bgColorContent=%23ffffff&fcHeader=%23333333&borderColorHeader=%23dddddd&bgColorHeader=%23e9e9e9&fcActive=%23ffffff&borderColorActive=%23003eff&bgColorActive=%23007fff&fcHover=%232b2b2b&borderColorHover=%23cccccc&bgColorHover=%23ededed&fcDefault=%23454545&borderColorDefault=%23c5c5c5&bgColorDefault=%23f6f6f6 +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; + pointer-events: none; +} + + +/* Icons +----------------------------------*/ +.ui-icon { + display: inline-block; + vertical-align: middle; + margin-top: -.25em; + position: relative; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + +.ui-widget-icon-block { + left: 50%; + margin-left: -8px; + display: block; +} + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + font-size: 100%; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: 0; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + cursor: pointer; + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-item-wrapper { + position: relative; + padding: 3px 1em 3px .4em; +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item-wrapper { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-button { + padding: .4em 1em; + display: inline-block; + position: relative; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + /* Support: IE <= 11 */ + overflow: visible; +} + +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} + +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2em; + box-sizing: border-box; + text-indent: -9999px; + white-space: nowrap; +} + +/* no icon support for input elements */ +input.ui-button.ui-button-icon-only { + text-indent: 0; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon { + position: absolute; + top: 50%; + left: 50%; + margin-top: -8px; + margin-left: -8px; +} + +.ui-button.ui-icon-notext .ui-icon { + padding: 0; + width: 2.1em; + height: 2.1em; + text-indent: -9999px; + white-space: nowrap; + +} + +input.ui-button.ui-icon-notext .ui-icon { + width: auto; + height: auto; + text-indent: 0; + white-space: normal; + padding: .4em 1em; +} + +/* workarounds */ +/* Support: Firefox 5 - 40 */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-controlgroup { + vertical-align: middle; + display: inline-block; +} +.ui-controlgroup > .ui-controlgroup-item { + float: left; + margin-left: 0; + margin-right: 0; +} +.ui-controlgroup > .ui-controlgroup-item:focus, +.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus { + z-index: 9999; +} +.ui-controlgroup-vertical > .ui-controlgroup-item { + display: block; + float: none; + width: 100%; + margin-top: 0; + margin-bottom: 0; + text-align: left; +} +.ui-controlgroup-vertical .ui-controlgroup-item { + box-sizing: border-box; +} +.ui-controlgroup .ui-controlgroup-label { + padding: .4em 1em; +} +.ui-controlgroup .ui-controlgroup-label span { + font-size: 80%; +} +.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item { + border-left: none; +} +.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item { + border-top: none; +} +.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content { + border-right: none; +} +.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content { + border-bottom: none; +} + +/* Spinner specific style fixes */ +.ui-controlgroup-vertical .ui-spinner-input { + + /* Support: IE8 only, Android < 4.4 only */ + width: 75%; + width: calc( 100% - 2.4em ); +} +.ui-controlgroup-vertical .ui-spinner .ui-spinner-up { + border-top-style: solid; +} + +.ui-checkboxradio-label .ui-icon-background { + box-shadow: inset 1px 1px 1px #ccc; + border-radius: .12em; + border: none; +} +.ui-checkboxradio-radio-label .ui-icon-background { + width: 16px; + height: 16px; + border-radius: 1em; + overflow: visible; + border: none; +} +.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon, +.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon { + background-image: none; + width: 8px; + height: 8px; + border-width: 4px; + border-style: solid; +} +.ui-checkboxradio-disabled { + pointer-events: none; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} + +/* Icons */ +.ui-datepicker .ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; + left: .5em; + top: .3em; +} +.ui-dialog { + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-n { + height: 2px; + top: 0; +} +.ui-dialog .ui-resizable-e { + width: 2px; + right: 0; +} +.ui-dialog .ui-resizable-s { + height: 2px; + bottom: 0; +} +.ui-dialog .ui-resizable-w { + width: 2px; + left: 0; +} +.ui-dialog .ui-resizable-se, +.ui-dialog .ui-resizable-sw, +.ui-dialog .ui-resizable-ne, +.ui-dialog .ui-resizable-nw { + width: 7px; + height: 7px; +} +.ui-dialog .ui-resizable-se { + right: 0; + bottom: 0; +} +.ui-dialog .ui-resizable-sw { + left: 0; + bottom: 0; +} +.ui-dialog .ui-resizable-ne { + right: 0; + top: 0; +} +.ui-dialog .ui-resizable-nw { + left: 0; + top: 0; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-text { + display: block; + margin-right: 20px; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-selectmenu-button.ui-button { + text-align: left; + white-space: nowrap; + width: 14em; +} +.ui-selectmenu-icon.ui-icon { + float: right; + margin-top: 0; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: .222em 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 2em; +} +.ui-spinner-button { + width: 1.6em; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top-style: none; + border-bottom-style: none; + border-right-style: none; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: default; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Arial,Helvetica,sans-serif; + font-size: 1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Arial,Helvetica,sans-serif; + font-size: 1em; +} +.ui-widget.ui-widget-content { + border: 1px solid #c5c5c5; +} +.ui-widget-content { + border: 1px solid #dddddd; + background: #ffffff; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #dddddd; + background: #e9e9e9; + color: #333333; + font-weight: bold; +} +.ui-widget-header a { + color: #333333; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default, +.ui-button, + +/* We use html here because we need a greater specificity to make sure disabled +works properly when clicked or hovered */ +html .ui-button.ui-state-disabled:hover, +html .ui-button.ui-state-disabled:active { + border: 1px solid #c5c5c5; + background: #f6f6f6; + font-weight: normal; + color: #454545; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited, +a.ui-button, +a:link.ui-button, +a:visited.ui-button, +.ui-button { + color: #454545; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus, +.ui-button:hover, +.ui-button:focus { + border: 1px solid #cccccc; + background: #ededed; + font-weight: normal; + color: #2b2b2b; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited, +a.ui-button:hover, +a.ui-button:focus { + color: #2b2b2b; + text-decoration: none; +} + +.ui-visual-focus { + box-shadow: 0 0 3px 1px rgb(94, 158, 214); +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + border: 1px solid #003eff; + background: #007fff; + font-weight: normal; + color: #ffffff; +} +.ui-icon-background, +.ui-state-active .ui-icon-background { + border: #003eff; + background-color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #dad55e; + background: #fffa90; + color: #777620; +} +.ui-state-checked { + border: 1px solid #dad55e; + background: #fffa90; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #777620; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #f1a899; + background: #fddfdf; + color: #5f3f3f; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #5f3f3f; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #5f3f3f; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("images/ui-icons_444444_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("images/ui-icons_444444_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon, +.ui-button:hover .ui-icon, +.ui-button:focus .ui-icon { + background-image: url("images/ui-icons_555555_256x240.png"); +} +.ui-state-active .ui-icon, +.ui-button:active .ui-icon { + background-image: url("images/ui-icons_ffffff_256x240.png"); +} +.ui-state-highlight .ui-icon, +.ui-button .ui-state-highlight.ui-icon { + background-image: url("images/ui-icons_777620_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("images/ui-icons_cc0000_256x240.png"); +} +.ui-button .ui-icon { + background-image: url("images/ui-icons_777777_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-caret-1-n { background-position: 0 0; } +.ui-icon-caret-1-ne { background-position: -16px 0; } +.ui-icon-caret-1-e { background-position: -32px 0; } +.ui-icon-caret-1-se { background-position: -48px 0; } +.ui-icon-caret-1-s { background-position: -65px 0; } +.ui-icon-caret-1-sw { background-position: -80px 0; } +.ui-icon-caret-1-w { background-position: -96px 0; } +.ui-icon-caret-1-nw { background-position: -112px 0; } +.ui-icon-caret-2-n-s { background-position: -128px 0; } +.ui-icon-caret-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -65px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -65px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 1px -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 3px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 3px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 3px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 3px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #aaaaaa; + opacity: .003; + filter: Alpha(Opacity=.3); /* support: IE8 */ +} +.ui-widget-shadow { + -webkit-box-shadow: 0px 0px 5px #666666; + box-shadow: 0px 0px 5px #666666; +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.js new file mode 100644 index 0000000..0213552 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/jquery-ui-1.12.1/jquery-ui.js @@ -0,0 +1,18706 @@ +/*! jQuery UI - v1.12.1 - 2016-09-14 +* http://jqueryui.com +* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define([ "jquery" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { + +$.ui = $.ui || {}; + +var version = $.ui.version = "1.12.1"; + + +/*! + * jQuery UI Widget 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Widget +//>>group: Core +//>>description: Provides a factory for creating stateful widgets with a common API. +//>>docs: http://api.jqueryui.com/jQuery.widget/ +//>>demos: http://jqueryui.com/widget/ + + + +var widgetUuid = 0; +var widgetSlice = Array.prototype.slice; + +$.cleanData = ( function( orig ) { + return function( elems ) { + var events, elem, i; + for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { + try { + + // Only trigger remove when necessary to save time + events = $._data( elem, "events" ); + if ( events && events.remove ) { + $( elem ).triggerHandler( "remove" ); + } + + // Http://bugs.jquery.com/ticket/8235 + } catch ( e ) {} + } + orig( elems ); + }; +} )( $.cleanData ); + +$.widget = function( name, base, prototype ) { + var existingConstructor, constructor, basePrototype; + + // ProxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + var proxiedPrototype = {}; + + var namespace = name.split( "." )[ 0 ]; + name = name.split( "." )[ 1 ]; + var fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + if ( $.isArray( prototype ) ) { + prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); + } + + // Create selector for plugin + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + return !!$.data( elem, fullName ); + }; + + $[ namespace ] = $[ namespace ] || {}; + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { + + // Allow instantiation without "new" keyword + if ( !this._createWidget ) { + return new constructor( options, element ); + } + + // Allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + + // Extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + + // Copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + + // Track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + } ); + + basePrototype = new base(); + + // We need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend( {}, basePrototype.options ); + $.each( prototype, function( prop, value ) { + if ( !$.isFunction( value ) ) { + proxiedPrototype[ prop ] = value; + return; + } + proxiedPrototype[ prop ] = ( function() { + function _super() { + return base.prototype[ prop ].apply( this, arguments ); + } + + function _superApply( args ) { + return base.prototype[ prop ].apply( this, args ); + } + + return function() { + var __super = this._super; + var __superApply = this._superApply; + var returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply( this, arguments ); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + } )(); + } ); + constructor.prototype = $.widget.extend( basePrototype, { + + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name + }, proxiedPrototype, { + constructor: constructor, + namespace: namespace, + widgetName: name, + widgetFullName: fullName + } ); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // Redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, + child._proto ); + } ); + + // Remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); + + return constructor; +}; + +$.widget.extend = function( target ) { + var input = widgetSlice.call( arguments, 1 ); + var inputIndex = 0; + var inputLength = input.length; + var key; + var value; + + for ( ; inputIndex < inputLength; inputIndex++ ) { + for ( key in input[ inputIndex ] ) { + value = input[ inputIndex ][ key ]; + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + + // Clone objects + if ( $.isPlainObject( value ) ) { + target[ key ] = $.isPlainObject( target[ key ] ) ? + $.widget.extend( {}, target[ key ], value ) : + + // Don't extend strings, arrays, etc. with objects + $.widget.extend( {}, value ); + + // Copy everything else by reference + } else { + target[ key ] = value; + } + } + } + } + return target; +}; + +$.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetFullName || name; + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string"; + var args = widgetSlice.call( arguments, 1 ); + var returnValue = this; + + if ( isMethodCall ) { + + // If this is an empty collection, we need to have the instance method + // return undefined instead of the jQuery instance + if ( !this.length && options === "instance" ) { + returnValue = undefined; + } else { + this.each( function() { + var methodValue; + var instance = $.data( this, fullName ); + + if ( options === "instance" ) { + returnValue = instance; + return false; + } + + if ( !instance ) { + return $.error( "cannot call methods on " + name + + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + + if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + + " widget instance" ); + } + + methodValue = instance[ options ].apply( instance, args ); + + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + } ); + } + } else { + + // Allow multiple hashes to be passed on init + if ( args.length ) { + options = $.widget.extend.apply( null, [ options ].concat( args ) ); + } + + this.each( function() { + var instance = $.data( this, fullName ); + if ( instance ) { + instance.option( options || {} ); + if ( instance._init ) { + instance._init(); + } + } else { + $.data( this, fullName, new object( options, this ) ); + } + } ); + } + + return returnValue; + }; +}; + +$.Widget = function( /* options, element */ ) {}; +$.Widget._childConstructors = []; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "
", + + options: { + classes: {}, + disabled: false, + + // Callbacks + create: null + }, + + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = widgetUuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + this.classesElementLookup = {}; + + if ( element !== this ) { + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + } ); + this.document = $( element.style ? + + // Element within the document + element.ownerDocument : + + // Element is window or document + element.document || element ); + this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow ); + } + + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this._create(); + + if ( this.options.disabled ) { + this._setOptionDisabled( this.options.disabled ); + } + + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + + _getCreateOptions: function() { + return {}; + }, + + _getCreateEventData: $.noop, + + _create: $.noop, + + _init: $.noop, + + destroy: function() { + var that = this; + + this._destroy(); + $.each( this.classesElementLookup, function( key, value ) { + that._removeClass( value, key ); + } ); + + // We can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .off( this.eventNamespace ) + .removeData( this.widgetFullName ); + this.widget() + .off( this.eventNamespace ) + .removeAttr( "aria-disabled" ); + + // Clean up events and states + this.bindings.off( this.eventNamespace ); + }, + + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key; + var parts; + var curOption; + var i; + + if ( arguments.length === 0 ) { + + // Don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + + // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( arguments.length === 1 ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( arguments.length === 1 ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + + _setOption: function( key, value ) { + if ( key === "classes" ) { + this._setOptionClasses( value ); + } + + this.options[ key ] = value; + + if ( key === "disabled" ) { + this._setOptionDisabled( value ); + } + + return this; + }, + + _setOptionClasses: function( value ) { + var classKey, elements, currentElements; + + for ( classKey in value ) { + currentElements = this.classesElementLookup[ classKey ]; + if ( value[ classKey ] === this.options.classes[ classKey ] || + !currentElements || + !currentElements.length ) { + continue; + } + + // We are doing this to create a new jQuery object because the _removeClass() call + // on the next line is going to destroy the reference to the current elements being + // tracked. We need to save a copy of this collection so that we can add the new classes + // below. + elements = $( currentElements.get() ); + this._removeClass( currentElements, classKey ); + + // We don't use _addClass() here, because that uses this.options.classes + // for generating the string of classes. We want to use the value passed in from + // _setOption(), this is the new value of the classes option which was passed to + // _setOption(). We pass this value directly to _classes(). + elements.addClass( this._classes( { + element: elements, + keys: classKey, + classes: value, + add: true + } ) ); + } + }, + + _setOptionDisabled: function( value ) { + this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value ); + + // If the widget is becoming disabled, then nothing is interactive + if ( value ) { + this._removeClass( this.hoverable, null, "ui-state-hover" ); + this._removeClass( this.focusable, null, "ui-state-focus" ); + } + }, + + enable: function() { + return this._setOptions( { disabled: false } ); + }, + + disable: function() { + return this._setOptions( { disabled: true } ); + }, + + _classes: function( options ) { + var full = []; + var that = this; + + options = $.extend( { + element: this.element, + classes: this.options.classes || {} + }, options ); + + function processClassString( classes, checkOption ) { + var current, i; + for ( i = 0; i < classes.length; i++ ) { + current = that.classesElementLookup[ classes[ i ] ] || $(); + if ( options.add ) { + current = $( $.unique( current.get().concat( options.element.get() ) ) ); + } else { + current = $( current.not( options.element ).get() ); + } + that.classesElementLookup[ classes[ i ] ] = current; + full.push( classes[ i ] ); + if ( checkOption && options.classes[ classes[ i ] ] ) { + full.push( options.classes[ classes[ i ] ] ); + } + } + } + + this._on( options.element, { + "remove": "_untrackClassesElement" + } ); + + if ( options.keys ) { + processClassString( options.keys.match( /\S+/g ) || [], true ); + } + if ( options.extra ) { + processClassString( options.extra.match( /\S+/g ) || [] ); + } + + return full.join( " " ); + }, + + _untrackClassesElement: function( event ) { + var that = this; + $.each( that.classesElementLookup, function( key, value ) { + if ( $.inArray( event.target, value ) !== -1 ) { + that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); + } + } ); + }, + + _removeClass: function( element, keys, extra ) { + return this._toggleClass( element, keys, extra, false ); + }, + + _addClass: function( element, keys, extra ) { + return this._toggleClass( element, keys, extra, true ); + }, + + _toggleClass: function( element, keys, extra, add ) { + add = ( typeof add === "boolean" ) ? add : extra; + var shift = ( typeof element === "string" || element === null ), + options = { + extra: shift ? keys : extra, + keys: shift ? element : keys, + element: shift ? this.element : element, + add: add + }; + options.element.toggleClass( this._classes( options ), add ); + return this; + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement; + var instance = this; + + // No suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // No element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + + // Allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // Copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^([\w:-]*)\s*(.*)$/ ); + var eventName = match[ 1 ] + instance.eventNamespace; + var selector = match[ 2 ]; + + if ( selector ) { + delegateElement.on( eventName, selector, handlerProxy ); + } else { + element.on( eventName, handlerProxy ); + } + } ); + }, + + _off: function( element, eventName ) { + eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + + this.eventNamespace; + element.off( eventName ).off( eventName ); + + // Clear the stack to avoid memory leaks (#10056) + this.bindings = $( this.bindings.not( element ).get() ); + this.focusable = $( this.focusable.not( element ).get() ); + this.hoverable = $( this.hoverable.not( element ).get() ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + this._addClass( $( event.currentTarget ), null, "ui-state-hover" ); + }, + mouseleave: function( event ) { + this._removeClass( $( event.currentTarget ), null, "ui-state-hover" ); + } + } ); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + this._addClass( $( event.currentTarget ), null, "ui-state-focus" ); + }, + focusout: function( event ) { + this._removeClass( $( event.currentTarget ), null, "ui-state-focus" ); + } + } ); + }, + + _trigger: function( type, event, data ) { + var prop, orig; + var callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + + // The original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // Copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + + var hasOptions; + var effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + + if ( options.delay ) { + element.delay( options.delay ); + } + + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue( function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + } ); + } + }; +} ); + +var widget = $.widget; + + +/*! + * jQuery UI Position 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/position/ + */ + +//>>label: Position +//>>group: Core +//>>description: Positions elements relative to other elements. +//>>docs: http://api.jqueryui.com/position/ +//>>demos: http://jqueryui.com/position/ + + +( function() { +var cachedScrollbarWidth, + max = Math.max, + abs = Math.abs, + rhorizontal = /left|center|right/, + rvertical = /top|center|bottom/, + roffset = /[\+\-]\d+(\.[\d]+)?%?/, + rposition = /^\w+/, + rpercent = /%$/, + _position = $.fn.position; + +function getOffsets( offsets, width, height ) { + return [ + parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), + parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) + ]; +} + +function parseCss( element, property ) { + return parseInt( $.css( element, property ), 10 ) || 0; +} + +function getDimensions( elem ) { + var raw = elem[ 0 ]; + if ( raw.nodeType === 9 ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: 0, left: 0 } + }; + } + if ( $.isWindow( raw ) ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: elem.scrollTop(), left: elem.scrollLeft() } + }; + } + if ( raw.preventDefault ) { + return { + width: 0, + height: 0, + offset: { top: raw.pageY, left: raw.pageX } + }; + } + return { + width: elem.outerWidth(), + height: elem.outerHeight(), + offset: elem.offset() + }; +} + +$.position = { + scrollbarWidth: function() { + if ( cachedScrollbarWidth !== undefined ) { + return cachedScrollbarWidth; + } + var w1, w2, + div = $( "
" + + "
" ), + innerDiv = div.children()[ 0 ]; + + $( "body" ).append( div ); + w1 = innerDiv.offsetWidth; + div.css( "overflow", "scroll" ); + + w2 = innerDiv.offsetWidth; + + if ( w1 === w2 ) { + w2 = div[ 0 ].clientWidth; + } + + div.remove(); + + return ( cachedScrollbarWidth = w1 - w2 ); + }, + getScrollInfo: function( within ) { + var overflowX = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-x" ), + overflowY = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-y" ), + hasOverflowX = overflowX === "scroll" || + ( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ), + hasOverflowY = overflowY === "scroll" || + ( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight ); + return { + width: hasOverflowY ? $.position.scrollbarWidth() : 0, + height: hasOverflowX ? $.position.scrollbarWidth() : 0 + }; + }, + getWithinInfo: function( element ) { + var withinElement = $( element || window ), + isWindow = $.isWindow( withinElement[ 0 ] ), + isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9, + hasOffset = !isWindow && !isDocument; + return { + element: withinElement, + isWindow: isWindow, + isDocument: isDocument, + offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 }, + scrollLeft: withinElement.scrollLeft(), + scrollTop: withinElement.scrollTop(), + width: withinElement.outerWidth(), + height: withinElement.outerHeight() + }; + } +}; + +$.fn.position = function( options ) { + if ( !options || !options.of ) { + return _position.apply( this, arguments ); + } + + // Make a copy, we don't want to modify arguments + options = $.extend( {}, options ); + + var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, + target = $( options.of ), + within = $.position.getWithinInfo( options.within ), + scrollInfo = $.position.getScrollInfo( within ), + collision = ( options.collision || "flip" ).split( " " ), + offsets = {}; + + dimensions = getDimensions( target ); + if ( target[ 0 ].preventDefault ) { + + // Force left top to allow flipping + options.at = "left top"; + } + targetWidth = dimensions.width; + targetHeight = dimensions.height; + targetOffset = dimensions.offset; + + // Clone to reuse original targetOffset later + basePosition = $.extend( {}, targetOffset ); + + // Force my and at to have valid horizontal and vertical positions + // if a value is missing or invalid, it will be converted to center + $.each( [ "my", "at" ], function() { + var pos = ( options[ this ] || "" ).split( " " ), + horizontalOffset, + verticalOffset; + + if ( pos.length === 1 ) { + pos = rhorizontal.test( pos[ 0 ] ) ? + pos.concat( [ "center" ] ) : + rvertical.test( pos[ 0 ] ) ? + [ "center" ].concat( pos ) : + [ "center", "center" ]; + } + pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; + pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; + + // Calculate offsets + horizontalOffset = roffset.exec( pos[ 0 ] ); + verticalOffset = roffset.exec( pos[ 1 ] ); + offsets[ this ] = [ + horizontalOffset ? horizontalOffset[ 0 ] : 0, + verticalOffset ? verticalOffset[ 0 ] : 0 + ]; + + // Reduce to just the positions without the offsets + options[ this ] = [ + rposition.exec( pos[ 0 ] )[ 0 ], + rposition.exec( pos[ 1 ] )[ 0 ] + ]; + } ); + + // Normalize collision option + if ( collision.length === 1 ) { + collision[ 1 ] = collision[ 0 ]; + } + + if ( options.at[ 0 ] === "right" ) { + basePosition.left += targetWidth; + } else if ( options.at[ 0 ] === "center" ) { + basePosition.left += targetWidth / 2; + } + + if ( options.at[ 1 ] === "bottom" ) { + basePosition.top += targetHeight; + } else if ( options.at[ 1 ] === "center" ) { + basePosition.top += targetHeight / 2; + } + + atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); + basePosition.left += atOffset[ 0 ]; + basePosition.top += atOffset[ 1 ]; + + return this.each( function() { + var collisionPosition, using, + elem = $( this ), + elemWidth = elem.outerWidth(), + elemHeight = elem.outerHeight(), + marginLeft = parseCss( this, "marginLeft" ), + marginTop = parseCss( this, "marginTop" ), + collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + + scrollInfo.width, + collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + + scrollInfo.height, + position = $.extend( {}, basePosition ), + myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); + + if ( options.my[ 0 ] === "right" ) { + position.left -= elemWidth; + } else if ( options.my[ 0 ] === "center" ) { + position.left -= elemWidth / 2; + } + + if ( options.my[ 1 ] === "bottom" ) { + position.top -= elemHeight; + } else if ( options.my[ 1 ] === "center" ) { + position.top -= elemHeight / 2; + } + + position.left += myOffset[ 0 ]; + position.top += myOffset[ 1 ]; + + collisionPosition = { + marginLeft: marginLeft, + marginTop: marginTop + }; + + $.each( [ "left", "top" ], function( i, dir ) { + if ( $.ui.position[ collision[ i ] ] ) { + $.ui.position[ collision[ i ] ][ dir ]( position, { + targetWidth: targetWidth, + targetHeight: targetHeight, + elemWidth: elemWidth, + elemHeight: elemHeight, + collisionPosition: collisionPosition, + collisionWidth: collisionWidth, + collisionHeight: collisionHeight, + offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], + my: options.my, + at: options.at, + within: within, + elem: elem + } ); + } + } ); + + if ( options.using ) { + + // Adds feedback as second argument to using callback, if present + using = function( props ) { + var left = targetOffset.left - position.left, + right = left + targetWidth - elemWidth, + top = targetOffset.top - position.top, + bottom = top + targetHeight - elemHeight, + feedback = { + target: { + element: target, + left: targetOffset.left, + top: targetOffset.top, + width: targetWidth, + height: targetHeight + }, + element: { + element: elem, + left: position.left, + top: position.top, + width: elemWidth, + height: elemHeight + }, + horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", + vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" + }; + if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { + feedback.horizontal = "center"; + } + if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { + feedback.vertical = "middle"; + } + if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { + feedback.important = "horizontal"; + } else { + feedback.important = "vertical"; + } + options.using.call( this, props, feedback ); + }; + } + + elem.offset( $.extend( position, { using: using } ) ); + } ); +}; + +$.ui.position = { + fit: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, + outerWidth = within.width, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = withinOffset - collisionPosLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, + newOverRight; + + // Element is wider than within + if ( data.collisionWidth > outerWidth ) { + + // Element is initially over the left side of within + if ( overLeft > 0 && overRight <= 0 ) { + newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - + withinOffset; + position.left += overLeft - newOverRight; + + // Element is initially over right side of within + } else if ( overRight > 0 && overLeft <= 0 ) { + position.left = withinOffset; + + // Element is initially over both left and right sides of within + } else { + if ( overLeft > overRight ) { + position.left = withinOffset + outerWidth - data.collisionWidth; + } else { + position.left = withinOffset; + } + } + + // Too far left -> align with left edge + } else if ( overLeft > 0 ) { + position.left += overLeft; + + // Too far right -> align with right edge + } else if ( overRight > 0 ) { + position.left -= overRight; + + // Adjust based on position and margin + } else { + position.left = max( position.left - collisionPosLeft, position.left ); + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollTop : within.offset.top, + outerHeight = data.within.height, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = withinOffset - collisionPosTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, + newOverBottom; + + // Element is taller than within + if ( data.collisionHeight > outerHeight ) { + + // Element is initially over the top of within + if ( overTop > 0 && overBottom <= 0 ) { + newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - + withinOffset; + position.top += overTop - newOverBottom; + + // Element is initially over bottom of within + } else if ( overBottom > 0 && overTop <= 0 ) { + position.top = withinOffset; + + // Element is initially over both top and bottom of within + } else { + if ( overTop > overBottom ) { + position.top = withinOffset + outerHeight - data.collisionHeight; + } else { + position.top = withinOffset; + } + } + + // Too far up -> align with top + } else if ( overTop > 0 ) { + position.top += overTop; + + // Too far down -> align with bottom edge + } else if ( overBottom > 0 ) { + position.top -= overBottom; + + // Adjust based on position and margin + } else { + position.top = max( position.top - collisionPosTop, position.top ); + } + } + }, + flip: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.offset.left + within.scrollLeft, + outerWidth = within.width, + offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = collisionPosLeft - offsetLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, + myOffset = data.my[ 0 ] === "left" ? + -data.elemWidth : + data.my[ 0 ] === "right" ? + data.elemWidth : + 0, + atOffset = data.at[ 0 ] === "left" ? + data.targetWidth : + data.at[ 0 ] === "right" ? + -data.targetWidth : + 0, + offset = -2 * data.offset[ 0 ], + newOverRight, + newOverLeft; + + if ( overLeft < 0 ) { + newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - + outerWidth - withinOffset; + if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { + position.left += myOffset + atOffset + offset; + } + } else if ( overRight > 0 ) { + newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + + atOffset + offset - offsetLeft; + if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { + position.left += myOffset + atOffset + offset; + } + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.offset.top + within.scrollTop, + outerHeight = within.height, + offsetTop = within.isWindow ? within.scrollTop : within.offset.top, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = collisionPosTop - offsetTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, + top = data.my[ 1 ] === "top", + myOffset = top ? + -data.elemHeight : + data.my[ 1 ] === "bottom" ? + data.elemHeight : + 0, + atOffset = data.at[ 1 ] === "top" ? + data.targetHeight : + data.at[ 1 ] === "bottom" ? + -data.targetHeight : + 0, + offset = -2 * data.offset[ 1 ], + newOverTop, + newOverBottom; + if ( overTop < 0 ) { + newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - + outerHeight - withinOffset; + if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { + position.top += myOffset + atOffset + offset; + } + } else if ( overBottom > 0 ) { + newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + + offset - offsetTop; + if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { + position.top += myOffset + atOffset + offset; + } + } + } + }, + flipfit: { + left: function() { + $.ui.position.flip.left.apply( this, arguments ); + $.ui.position.fit.left.apply( this, arguments ); + }, + top: function() { + $.ui.position.flip.top.apply( this, arguments ); + $.ui.position.fit.top.apply( this, arguments ); + } + } +}; + +} )(); + +var position = $.ui.position; + + +/*! + * jQuery UI :data 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: :data Selector +//>>group: Core +//>>description: Selects elements which have data stored under the specified key. +//>>docs: http://api.jqueryui.com/data-selector/ + + +var data = $.extend( $.expr[ ":" ], { + data: $.expr.createPseudo ? + $.expr.createPseudo( function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + } ) : + + // Support: jQuery <1.8 + function( elem, i, match ) { + return !!$.data( elem, match[ 3 ] ); + } +} ); + +/*! + * jQuery UI Disable Selection 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: disableSelection +//>>group: Core +//>>description: Disable selection of text content within the set of matched elements. +//>>docs: http://api.jqueryui.com/disableSelection/ + +// This file is deprecated + + +var disableSelection = $.fn.extend( { + disableSelection: ( function() { + var eventType = "onselectstart" in document.createElement( "div" ) ? + "selectstart" : + "mousedown"; + + return function() { + return this.on( eventType + ".ui-disableSelection", function( event ) { + event.preventDefault(); + } ); + }; + } )(), + + enableSelection: function() { + return this.off( ".ui-disableSelection" ); + } +} ); + + +/*! + * jQuery UI Effects 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Effects Core +//>>group: Effects +// jscs:disable maximumLineLength +//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects. +// jscs:enable maximumLineLength +//>>docs: http://api.jqueryui.com/category/effects-core/ +//>>demos: http://jqueryui.com/effect/ + + + +var dataSpace = "ui-effects-", + dataSpaceStyle = "ui-effects-style", + dataSpaceAnimated = "ui-effects-animated", + + // Create a local jQuery because jQuery Color relies on it and the + // global may not exist with AMD and a custom build (#10199) + jQuery = $; + +$.effects = { + effect: {} +}; + +/*! + * jQuery Color Animations v2.1.2 + * https://github.com/jquery/jquery-color + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * Date: Wed Jan 16 08:47:09 2013 -0600 + */ +( function( jQuery, undefined ) { + + var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " + + "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", + + // Plusequals test for += 100 -= 100 + rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, + + // A set of RE's that can match strings and generate color tuples. + stringParsers = [ { + re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ], + execResult[ 3 ], + execResult[ 4 ] + ]; + } + }, { + re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ] * 2.55, + execResult[ 2 ] * 2.55, + execResult[ 3 ] * 2.55, + execResult[ 4 ] + ]; + } + }, { + + // This regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ], 16 ) + ]; + } + }, { + + // This regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) + ]; + } + }, { + re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + space: "hsla", + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ] / 100, + execResult[ 3 ] / 100, + execResult[ 4 ] + ]; + } + } ], + + // JQuery.Color( ) + color = jQuery.Color = function( color, green, blue, alpha ) { + return new jQuery.Color.fn.parse( color, green, blue, alpha ); + }, + spaces = { + rgba: { + props: { + red: { + idx: 0, + type: "byte" + }, + green: { + idx: 1, + type: "byte" + }, + blue: { + idx: 2, + type: "byte" + } + } + }, + + hsla: { + props: { + hue: { + idx: 0, + type: "degrees" + }, + saturation: { + idx: 1, + type: "percent" + }, + lightness: { + idx: 2, + type: "percent" + } + } + } + }, + propTypes = { + "byte": { + floor: true, + max: 255 + }, + "percent": { + max: 1 + }, + "degrees": { + mod: 360, + floor: true + } + }, + support = color.support = {}, + + // Element for support tests + supportElem = jQuery( "

" )[ 0 ], + + // Colors = jQuery.Color.names + colors, + + // Local aliases of functions called often + each = jQuery.each; + +// Determine rgba support immediately +supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; +support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; + +// Define cache name and alpha properties +// for rgba and hsla spaces +each( spaces, function( spaceName, space ) { + space.cache = "_" + spaceName; + space.props.alpha = { + idx: 3, + type: "percent", + def: 1 + }; +} ); + +function clamp( value, prop, allowEmpty ) { + var type = propTypes[ prop.type ] || {}; + + if ( value == null ) { + return ( allowEmpty || !prop.def ) ? null : prop.def; + } + + // ~~ is an short way of doing floor for positive numbers + value = type.floor ? ~~value : parseFloat( value ); + + // IE will pass in empty strings as value for alpha, + // which will hit this case + if ( isNaN( value ) ) { + return prop.def; + } + + if ( type.mod ) { + + // We add mod before modding to make sure that negatives values + // get converted properly: -10 -> 350 + return ( value + type.mod ) % type.mod; + } + + // For now all property types without mod have min and max + return 0 > value ? 0 : type.max < value ? type.max : value; +} + +function stringParse( string ) { + var inst = color(), + rgba = inst._rgba = []; + + string = string.toLowerCase(); + + each( stringParsers, function( i, parser ) { + var parsed, + match = parser.re.exec( string ), + values = match && parser.parse( match ), + spaceName = parser.space || "rgba"; + + if ( values ) { + parsed = inst[ spaceName ]( values ); + + // If this was an rgba parse the assignment might happen twice + // oh well.... + inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; + rgba = inst._rgba = parsed._rgba; + + // Exit each( stringParsers ) here because we matched + return false; + } + } ); + + // Found a stringParser that handled it + if ( rgba.length ) { + + // If this came from a parsed string, force "transparent" when alpha is 0 + // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) + if ( rgba.join() === "0,0,0,0" ) { + jQuery.extend( rgba, colors.transparent ); + } + return inst; + } + + // Named colors + return colors[ string ]; +} + +color.fn = jQuery.extend( color.prototype, { + parse: function( red, green, blue, alpha ) { + if ( red === undefined ) { + this._rgba = [ null, null, null, null ]; + return this; + } + if ( red.jquery || red.nodeType ) { + red = jQuery( red ).css( green ); + green = undefined; + } + + var inst = this, + type = jQuery.type( red ), + rgba = this._rgba = []; + + // More than 1 argument specified - assume ( red, green, blue, alpha ) + if ( green !== undefined ) { + red = [ red, green, blue, alpha ]; + type = "array"; + } + + if ( type === "string" ) { + return this.parse( stringParse( red ) || colors._default ); + } + + if ( type === "array" ) { + each( spaces.rgba.props, function( key, prop ) { + rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); + } ); + return this; + } + + if ( type === "object" ) { + if ( red instanceof color ) { + each( spaces, function( spaceName, space ) { + if ( red[ space.cache ] ) { + inst[ space.cache ] = red[ space.cache ].slice(); + } + } ); + } else { + each( spaces, function( spaceName, space ) { + var cache = space.cache; + each( space.props, function( key, prop ) { + + // If the cache doesn't exist, and we know how to convert + if ( !inst[ cache ] && space.to ) { + + // If the value was null, we don't need to copy it + // if the key was alpha, we don't need to copy it either + if ( key === "alpha" || red[ key ] == null ) { + return; + } + inst[ cache ] = space.to( inst._rgba ); + } + + // This is the only case where we allow nulls for ALL properties. + // call clamp with alwaysAllowEmpty + inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); + } ); + + // Everything defined but alpha? + if ( inst[ cache ] && + jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { + + // Use the default of 1 + inst[ cache ][ 3 ] = 1; + if ( space.from ) { + inst._rgba = space.from( inst[ cache ] ); + } + } + } ); + } + return this; + } + }, + is: function( compare ) { + var is = color( compare ), + same = true, + inst = this; + + each( spaces, function( _, space ) { + var localCache, + isCache = is[ space.cache ]; + if ( isCache ) { + localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; + each( space.props, function( _, prop ) { + if ( isCache[ prop.idx ] != null ) { + same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); + return same; + } + } ); + } + return same; + } ); + return same; + }, + _space: function() { + var used = [], + inst = this; + each( spaces, function( spaceName, space ) { + if ( inst[ space.cache ] ) { + used.push( spaceName ); + } + } ); + return used.pop(); + }, + transition: function( other, distance ) { + var end = color( other ), + spaceName = end._space(), + space = spaces[ spaceName ], + startColor = this.alpha() === 0 ? color( "transparent" ) : this, + start = startColor[ space.cache ] || space.to( startColor._rgba ), + result = start.slice(); + + end = end[ space.cache ]; + each( space.props, function( key, prop ) { + var index = prop.idx, + startValue = start[ index ], + endValue = end[ index ], + type = propTypes[ prop.type ] || {}; + + // If null, don't override start value + if ( endValue === null ) { + return; + } + + // If null - use end + if ( startValue === null ) { + result[ index ] = endValue; + } else { + if ( type.mod ) { + if ( endValue - startValue > type.mod / 2 ) { + startValue += type.mod; + } else if ( startValue - endValue > type.mod / 2 ) { + startValue -= type.mod; + } + } + result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); + } + } ); + return this[ spaceName ]( result ); + }, + blend: function( opaque ) { + + // If we are already opaque - return ourself + if ( this._rgba[ 3 ] === 1 ) { + return this; + } + + var rgb = this._rgba.slice(), + a = rgb.pop(), + blend = color( opaque )._rgba; + + return color( jQuery.map( rgb, function( v, i ) { + return ( 1 - a ) * blend[ i ] + a * v; + } ) ); + }, + toRgbaString: function() { + var prefix = "rgba(", + rgba = jQuery.map( this._rgba, function( v, i ) { + return v == null ? ( i > 2 ? 1 : 0 ) : v; + } ); + + if ( rgba[ 3 ] === 1 ) { + rgba.pop(); + prefix = "rgb("; + } + + return prefix + rgba.join() + ")"; + }, + toHslaString: function() { + var prefix = "hsla(", + hsla = jQuery.map( this.hsla(), function( v, i ) { + if ( v == null ) { + v = i > 2 ? 1 : 0; + } + + // Catch 1 and 2 + if ( i && i < 3 ) { + v = Math.round( v * 100 ) + "%"; + } + return v; + } ); + + if ( hsla[ 3 ] === 1 ) { + hsla.pop(); + prefix = "hsl("; + } + return prefix + hsla.join() + ")"; + }, + toHexString: function( includeAlpha ) { + var rgba = this._rgba.slice(), + alpha = rgba.pop(); + + if ( includeAlpha ) { + rgba.push( ~~( alpha * 255 ) ); + } + + return "#" + jQuery.map( rgba, function( v ) { + + // Default to 0 when nulls exist + v = ( v || 0 ).toString( 16 ); + return v.length === 1 ? "0" + v : v; + } ).join( "" ); + }, + toString: function() { + return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); + } +} ); +color.fn.parse.prototype = color.fn; + +// Hsla conversions adapted from: +// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 + +function hue2rgb( p, q, h ) { + h = ( h + 1 ) % 1; + if ( h * 6 < 1 ) { + return p + ( q - p ) * h * 6; + } + if ( h * 2 < 1 ) { + return q; + } + if ( h * 3 < 2 ) { + return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; + } + return p; +} + +spaces.hsla.to = function( rgba ) { + if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { + return [ null, null, null, rgba[ 3 ] ]; + } + var r = rgba[ 0 ] / 255, + g = rgba[ 1 ] / 255, + b = rgba[ 2 ] / 255, + a = rgba[ 3 ], + max = Math.max( r, g, b ), + min = Math.min( r, g, b ), + diff = max - min, + add = max + min, + l = add * 0.5, + h, s; + + if ( min === max ) { + h = 0; + } else if ( r === max ) { + h = ( 60 * ( g - b ) / diff ) + 360; + } else if ( g === max ) { + h = ( 60 * ( b - r ) / diff ) + 120; + } else { + h = ( 60 * ( r - g ) / diff ) + 240; + } + + // Chroma (diff) == 0 means greyscale which, by definition, saturation = 0% + // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) + if ( diff === 0 ) { + s = 0; + } else if ( l <= 0.5 ) { + s = diff / add; + } else { + s = diff / ( 2 - add ); + } + return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ]; +}; + +spaces.hsla.from = function( hsla ) { + if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { + return [ null, null, null, hsla[ 3 ] ]; + } + var h = hsla[ 0 ] / 360, + s = hsla[ 1 ], + l = hsla[ 2 ], + a = hsla[ 3 ], + q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, + p = 2 * l - q; + + return [ + Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), + Math.round( hue2rgb( p, q, h ) * 255 ), + Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), + a + ]; +}; + +each( spaces, function( spaceName, space ) { + var props = space.props, + cache = space.cache, + to = space.to, + from = space.from; + + // Makes rgba() and hsla() + color.fn[ spaceName ] = function( value ) { + + // Generate a cache for this space if it doesn't exist + if ( to && !this[ cache ] ) { + this[ cache ] = to( this._rgba ); + } + if ( value === undefined ) { + return this[ cache ].slice(); + } + + var ret, + type = jQuery.type( value ), + arr = ( type === "array" || type === "object" ) ? value : arguments, + local = this[ cache ].slice(); + + each( props, function( key, prop ) { + var val = arr[ type === "object" ? key : prop.idx ]; + if ( val == null ) { + val = local[ prop.idx ]; + } + local[ prop.idx ] = clamp( val, prop ); + } ); + + if ( from ) { + ret = color( from( local ) ); + ret[ cache ] = local; + return ret; + } else { + return color( local ); + } + }; + + // Makes red() green() blue() alpha() hue() saturation() lightness() + each( props, function( key, prop ) { + + // Alpha is included in more than one space + if ( color.fn[ key ] ) { + return; + } + color.fn[ key ] = function( value ) { + var vtype = jQuery.type( value ), + fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), + local = this[ fn ](), + cur = local[ prop.idx ], + match; + + if ( vtype === "undefined" ) { + return cur; + } + + if ( vtype === "function" ) { + value = value.call( this, cur ); + vtype = jQuery.type( value ); + } + if ( value == null && prop.empty ) { + return this; + } + if ( vtype === "string" ) { + match = rplusequals.exec( value ); + if ( match ) { + value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); + } + } + local[ prop.idx ] = value; + return this[ fn ]( local ); + }; + } ); +} ); + +// Add cssHook and .fx.step function for each named hook. +// accept a space separated string of properties +color.hook = function( hook ) { + var hooks = hook.split( " " ); + each( hooks, function( i, hook ) { + jQuery.cssHooks[ hook ] = { + set: function( elem, value ) { + var parsed, curElem, + backgroundColor = ""; + + if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || + ( parsed = stringParse( value ) ) ) ) { + value = color( parsed || value ); + if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { + curElem = hook === "backgroundColor" ? elem.parentNode : elem; + while ( + ( backgroundColor === "" || backgroundColor === "transparent" ) && + curElem && curElem.style + ) { + try { + backgroundColor = jQuery.css( curElem, "backgroundColor" ); + curElem = curElem.parentNode; + } catch ( e ) { + } + } + + value = value.blend( backgroundColor && backgroundColor !== "transparent" ? + backgroundColor : + "_default" ); + } + + value = value.toRgbaString(); + } + try { + elem.style[ hook ] = value; + } catch ( e ) { + + // Wrapped to prevent IE from throwing errors on "invalid" values like + // 'auto' or 'inherit' + } + } + }; + jQuery.fx.step[ hook ] = function( fx ) { + if ( !fx.colorInit ) { + fx.start = color( fx.elem, hook ); + fx.end = color( fx.end ); + fx.colorInit = true; + } + jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); + }; + } ); + +}; + +color.hook( stepHooks ); + +jQuery.cssHooks.borderColor = { + expand: function( value ) { + var expanded = {}; + + each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { + expanded[ "border" + part + "Color" ] = value; + } ); + return expanded; + } +}; + +// Basic color names only. +// Usage of any of the other color names requires adding yourself or including +// jquery.color.svg-names.js. +colors = jQuery.Color.names = { + + // 4.1. Basic color keywords + aqua: "#00ffff", + black: "#000000", + blue: "#0000ff", + fuchsia: "#ff00ff", + gray: "#808080", + green: "#008000", + lime: "#00ff00", + maroon: "#800000", + navy: "#000080", + olive: "#808000", + purple: "#800080", + red: "#ff0000", + silver: "#c0c0c0", + teal: "#008080", + white: "#ffffff", + yellow: "#ffff00", + + // 4.2.3. "transparent" color keyword + transparent: [ null, null, null, 0 ], + + _default: "#ffffff" +}; + +} )( jQuery ); + +/******************************************************************************/ +/****************************** CLASS ANIMATIONS ******************************/ +/******************************************************************************/ +( function() { + +var classAnimationActions = [ "add", "remove", "toggle" ], + shorthandStyles = { + border: 1, + borderBottom: 1, + borderColor: 1, + borderLeft: 1, + borderRight: 1, + borderTop: 1, + borderWidth: 1, + margin: 1, + padding: 1 + }; + +$.each( + [ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], + function( _, prop ) { + $.fx.step[ prop ] = function( fx ) { + if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { + jQuery.style( fx.elem, prop, fx.end ); + fx.setAttr = true; + } + }; + } +); + +function getElementStyles( elem ) { + var key, len, + style = elem.ownerDocument.defaultView ? + elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : + elem.currentStyle, + styles = {}; + + if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { + len = style.length; + while ( len-- ) { + key = style[ len ]; + if ( typeof style[ key ] === "string" ) { + styles[ $.camelCase( key ) ] = style[ key ]; + } + } + + // Support: Opera, IE <9 + } else { + for ( key in style ) { + if ( typeof style[ key ] === "string" ) { + styles[ key ] = style[ key ]; + } + } + } + + return styles; +} + +function styleDifference( oldStyle, newStyle ) { + var diff = {}, + name, value; + + for ( name in newStyle ) { + value = newStyle[ name ]; + if ( oldStyle[ name ] !== value ) { + if ( !shorthandStyles[ name ] ) { + if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { + diff[ name ] = value; + } + } + } + } + + return diff; +} + +// Support: jQuery <1.8 +if ( !$.fn.addBack ) { + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +$.effects.animateClass = function( value, duration, easing, callback ) { + var o = $.speed( duration, easing, callback ); + + return this.queue( function() { + var animated = $( this ), + baseClass = animated.attr( "class" ) || "", + applyClassChange, + allAnimations = o.children ? animated.find( "*" ).addBack() : animated; + + // Map the animated objects to store the original styles. + allAnimations = allAnimations.map( function() { + var el = $( this ); + return { + el: el, + start: getElementStyles( this ) + }; + } ); + + // Apply class change + applyClassChange = function() { + $.each( classAnimationActions, function( i, action ) { + if ( value[ action ] ) { + animated[ action + "Class" ]( value[ action ] ); + } + } ); + }; + applyClassChange(); + + // Map all animated objects again - calculate new styles and diff + allAnimations = allAnimations.map( function() { + this.end = getElementStyles( this.el[ 0 ] ); + this.diff = styleDifference( this.start, this.end ); + return this; + } ); + + // Apply original class + animated.attr( "class", baseClass ); + + // Map all animated objects again - this time collecting a promise + allAnimations = allAnimations.map( function() { + var styleInfo = this, + dfd = $.Deferred(), + opts = $.extend( {}, o, { + queue: false, + complete: function() { + dfd.resolve( styleInfo ); + } + } ); + + this.el.animate( this.diff, opts ); + return dfd.promise(); + } ); + + // Once all animations have completed: + $.when.apply( $, allAnimations.get() ).done( function() { + + // Set the final class + applyClassChange(); + + // For each animated element, + // clear all css properties that were animated + $.each( arguments, function() { + var el = this.el; + $.each( this.diff, function( key ) { + el.css( key, "" ); + } ); + } ); + + // This is guarnteed to be there if you use jQuery.speed() + // it also handles dequeuing the next anim... + o.complete.call( animated[ 0 ] ); + } ); + } ); +}; + +$.fn.extend( { + addClass: ( function( orig ) { + return function( classNames, speed, easing, callback ) { + return speed ? + $.effects.animateClass.call( this, + { add: classNames }, speed, easing, callback ) : + orig.apply( this, arguments ); + }; + } )( $.fn.addClass ), + + removeClass: ( function( orig ) { + return function( classNames, speed, easing, callback ) { + return arguments.length > 1 ? + $.effects.animateClass.call( this, + { remove: classNames }, speed, easing, callback ) : + orig.apply( this, arguments ); + }; + } )( $.fn.removeClass ), + + toggleClass: ( function( orig ) { + return function( classNames, force, speed, easing, callback ) { + if ( typeof force === "boolean" || force === undefined ) { + if ( !speed ) { + + // Without speed parameter + return orig.apply( this, arguments ); + } else { + return $.effects.animateClass.call( this, + ( force ? { add: classNames } : { remove: classNames } ), + speed, easing, callback ); + } + } else { + + // Without force parameter + return $.effects.animateClass.call( this, + { toggle: classNames }, force, speed, easing ); + } + }; + } )( $.fn.toggleClass ), + + switchClass: function( remove, add, speed, easing, callback ) { + return $.effects.animateClass.call( this, { + add: add, + remove: remove + }, speed, easing, callback ); + } +} ); + +} )(); + +/******************************************************************************/ +/*********************************** EFFECTS **********************************/ +/******************************************************************************/ + +( function() { + +if ( $.expr && $.expr.filters && $.expr.filters.animated ) { + $.expr.filters.animated = ( function( orig ) { + return function( elem ) { + return !!$( elem ).data( dataSpaceAnimated ) || orig( elem ); + }; + } )( $.expr.filters.animated ); +} + +if ( $.uiBackCompat !== false ) { + $.extend( $.effects, { + + // Saves a set of properties in a data storage + save: function( element, set ) { + var i = 0, length = set.length; + for ( ; i < length; i++ ) { + if ( set[ i ] !== null ) { + element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); + } + } + }, + + // Restores a set of previously saved properties from a data storage + restore: function( element, set ) { + var val, i = 0, length = set.length; + for ( ; i < length; i++ ) { + if ( set[ i ] !== null ) { + val = element.data( dataSpace + set[ i ] ); + element.css( set[ i ], val ); + } + } + }, + + setMode: function( el, mode ) { + if ( mode === "toggle" ) { + mode = el.is( ":hidden" ) ? "show" : "hide"; + } + return mode; + }, + + // Wraps the element around a wrapper that copies position properties + createWrapper: function( element ) { + + // If the element is already wrapped, return it + if ( element.parent().is( ".ui-effects-wrapper" ) ) { + return element.parent(); + } + + // Wrap the element + var props = { + width: element.outerWidth( true ), + height: element.outerHeight( true ), + "float": element.css( "float" ) + }, + wrapper = $( "

" ) + .addClass( "ui-effects-wrapper" ) + .css( { + fontSize: "100%", + background: "transparent", + border: "none", + margin: 0, + padding: 0 + } ), + + // Store the size in case width/height are defined in % - Fixes #5245 + size = { + width: element.width(), + height: element.height() + }, + active = document.activeElement; + + // Support: Firefox + // Firefox incorrectly exposes anonymous content + // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 + try { + active.id; + } catch ( e ) { + active = document.body; + } + + element.wrap( wrapper ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).trigger( "focus" ); + } + + // Hotfix for jQuery 1.4 since some change in wrap() seems to actually + // lose the reference to the wrapped element + wrapper = element.parent(); + + // Transfer positioning properties to the wrapper + if ( element.css( "position" ) === "static" ) { + wrapper.css( { position: "relative" } ); + element.css( { position: "relative" } ); + } else { + $.extend( props, { + position: element.css( "position" ), + zIndex: element.css( "z-index" ) + } ); + $.each( [ "top", "left", "bottom", "right" ], function( i, pos ) { + props[ pos ] = element.css( pos ); + if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { + props[ pos ] = "auto"; + } + } ); + element.css( { + position: "relative", + top: 0, + left: 0, + right: "auto", + bottom: "auto" + } ); + } + element.css( size ); + + return wrapper.css( props ).show(); + }, + + removeWrapper: function( element ) { + var active = document.activeElement; + + if ( element.parent().is( ".ui-effects-wrapper" ) ) { + element.parent().replaceWith( element ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).trigger( "focus" ); + } + } + + return element; + } + } ); +} + +$.extend( $.effects, { + version: "1.12.1", + + define: function( name, mode, effect ) { + if ( !effect ) { + effect = mode; + mode = "effect"; + } + + $.effects.effect[ name ] = effect; + $.effects.effect[ name ].mode = mode; + + return effect; + }, + + scaledDimensions: function( element, percent, direction ) { + if ( percent === 0 ) { + return { + height: 0, + width: 0, + outerHeight: 0, + outerWidth: 0 + }; + } + + var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1, + y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1; + + return { + height: element.height() * y, + width: element.width() * x, + outerHeight: element.outerHeight() * y, + outerWidth: element.outerWidth() * x + }; + + }, + + clipToBox: function( animation ) { + return { + width: animation.clip.right - animation.clip.left, + height: animation.clip.bottom - animation.clip.top, + left: animation.clip.left, + top: animation.clip.top + }; + }, + + // Injects recently queued functions to be first in line (after "inprogress") + unshift: function( element, queueLength, count ) { + var queue = element.queue(); + + if ( queueLength > 1 ) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queueLength, count ) ) ); + } + element.dequeue(); + }, + + saveStyle: function( element ) { + element.data( dataSpaceStyle, element[ 0 ].style.cssText ); + }, + + restoreStyle: function( element ) { + element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || ""; + element.removeData( dataSpaceStyle ); + }, + + mode: function( element, mode ) { + var hidden = element.is( ":hidden" ); + + if ( mode === "toggle" ) { + mode = hidden ? "show" : "hide"; + } + if ( hidden ? mode === "hide" : mode === "show" ) { + mode = "none"; + } + return mode; + }, + + // Translates a [top,left] array into a baseline value + getBaseline: function( origin, original ) { + var y, x; + + switch ( origin[ 0 ] ) { + case "top": + y = 0; + break; + case "middle": + y = 0.5; + break; + case "bottom": + y = 1; + break; + default: + y = origin[ 0 ] / original.height; + } + + switch ( origin[ 1 ] ) { + case "left": + x = 0; + break; + case "center": + x = 0.5; + break; + case "right": + x = 1; + break; + default: + x = origin[ 1 ] / original.width; + } + + return { + x: x, + y: y + }; + }, + + // Creates a placeholder element so that the original element can be made absolute + createPlaceholder: function( element ) { + var placeholder, + cssPosition = element.css( "position" ), + position = element.position(); + + // Lock in margins first to account for form elements, which + // will change margin if you explicitly set height + // see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380 + // Support: Safari + element.css( { + marginTop: element.css( "marginTop" ), + marginBottom: element.css( "marginBottom" ), + marginLeft: element.css( "marginLeft" ), + marginRight: element.css( "marginRight" ) + } ) + .outerWidth( element.outerWidth() ) + .outerHeight( element.outerHeight() ); + + if ( /^(static|relative)/.test( cssPosition ) ) { + cssPosition = "absolute"; + + placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( { + + // Convert inline to inline block to account for inline elements + // that turn to inline block based on content (like img) + display: /^(inline|ruby)/.test( element.css( "display" ) ) ? + "inline-block" : + "block", + visibility: "hidden", + + // Margins need to be set to account for margin collapse + marginTop: element.css( "marginTop" ), + marginBottom: element.css( "marginBottom" ), + marginLeft: element.css( "marginLeft" ), + marginRight: element.css( "marginRight" ), + "float": element.css( "float" ) + } ) + .outerWidth( element.outerWidth() ) + .outerHeight( element.outerHeight() ) + .addClass( "ui-effects-placeholder" ); + + element.data( dataSpace + "placeholder", placeholder ); + } + + element.css( { + position: cssPosition, + left: position.left, + top: position.top + } ); + + return placeholder; + }, + + removePlaceholder: function( element ) { + var dataKey = dataSpace + "placeholder", + placeholder = element.data( dataKey ); + + if ( placeholder ) { + placeholder.remove(); + element.removeData( dataKey ); + } + }, + + // Removes a placeholder if it exists and restores + // properties that were modified during placeholder creation + cleanUp: function( element ) { + $.effects.restoreStyle( element ); + $.effects.removePlaceholder( element ); + }, + + setTransition: function( element, list, factor, value ) { + value = value || {}; + $.each( list, function( i, x ) { + var unit = element.cssUnit( x ); + if ( unit[ 0 ] > 0 ) { + value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; + } + } ); + return value; + } +} ); + +// Return an effect options object for the given parameters: +function _normalizeArguments( effect, options, speed, callback ) { + + // Allow passing all options as the first parameter + if ( $.isPlainObject( effect ) ) { + options = effect; + effect = effect.effect; + } + + // Convert to an object + effect = { effect: effect }; + + // Catch (effect, null, ...) + if ( options == null ) { + options = {}; + } + + // Catch (effect, callback) + if ( $.isFunction( options ) ) { + callback = options; + speed = null; + options = {}; + } + + // Catch (effect, speed, ?) + if ( typeof options === "number" || $.fx.speeds[ options ] ) { + callback = speed; + speed = options; + options = {}; + } + + // Catch (effect, options, callback) + if ( $.isFunction( speed ) ) { + callback = speed; + speed = null; + } + + // Add options to effect + if ( options ) { + $.extend( effect, options ); + } + + speed = speed || options.duration; + effect.duration = $.fx.off ? 0 : + typeof speed === "number" ? speed : + speed in $.fx.speeds ? $.fx.speeds[ speed ] : + $.fx.speeds._default; + + effect.complete = callback || options.complete; + + return effect; +} + +function standardAnimationOption( option ) { + + // Valid standard speeds (nothing, number, named speed) + if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { + return true; + } + + // Invalid strings - treat as "normal" speed + if ( typeof option === "string" && !$.effects.effect[ option ] ) { + return true; + } + + // Complete callback + if ( $.isFunction( option ) ) { + return true; + } + + // Options hash (but not naming an effect) + if ( typeof option === "object" && !option.effect ) { + return true; + } + + // Didn't match any standard API + return false; +} + +$.fn.extend( { + effect: function( /* effect, options, speed, callback */ ) { + var args = _normalizeArguments.apply( this, arguments ), + effectMethod = $.effects.effect[ args.effect ], + defaultMode = effectMethod.mode, + queue = args.queue, + queueName = queue || "fx", + complete = args.complete, + mode = args.mode, + modes = [], + prefilter = function( next ) { + var el = $( this ), + normalizedMode = $.effects.mode( el, mode ) || defaultMode; + + // Sentinel for duck-punching the :animated psuedo-selector + el.data( dataSpaceAnimated, true ); + + // Save effect mode for later use, + // we can't just call $.effects.mode again later, + // as the .show() below destroys the initial state + modes.push( normalizedMode ); + + // See $.uiBackCompat inside of run() for removal of defaultMode in 1.13 + if ( defaultMode && ( normalizedMode === "show" || + ( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) { + el.show(); + } + + if ( !defaultMode || normalizedMode !== "none" ) { + $.effects.saveStyle( el ); + } + + if ( $.isFunction( next ) ) { + next(); + } + }; + + if ( $.fx.off || !effectMethod ) { + + // Delegate to the original method (e.g., .show()) if possible + if ( mode ) { + return this[ mode ]( args.duration, complete ); + } else { + return this.each( function() { + if ( complete ) { + complete.call( this ); + } + } ); + } + } + + function run( next ) { + var elem = $( this ); + + function cleanup() { + elem.removeData( dataSpaceAnimated ); + + $.effects.cleanUp( elem ); + + if ( args.mode === "hide" ) { + elem.hide(); + } + + done(); + } + + function done() { + if ( $.isFunction( complete ) ) { + complete.call( elem[ 0 ] ); + } + + if ( $.isFunction( next ) ) { + next(); + } + } + + // Override mode option on a per element basis, + // as toggle can be either show or hide depending on element state + args.mode = modes.shift(); + + if ( $.uiBackCompat !== false && !defaultMode ) { + if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { + + // Call the core method to track "olddisplay" properly + elem[ mode ](); + done(); + } else { + effectMethod.call( elem[ 0 ], args, done ); + } + } else { + if ( args.mode === "none" ) { + + // Call the core method to track "olddisplay" properly + elem[ mode ](); + done(); + } else { + effectMethod.call( elem[ 0 ], args, cleanup ); + } + } + } + + // Run prefilter on all elements first to ensure that + // any showing or hiding happens before placeholder creation, + // which ensures that any layout changes are correctly captured. + return queue === false ? + this.each( prefilter ).each( run ) : + this.queue( queueName, prefilter ).queue( queueName, run ); + }, + + show: ( function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "show"; + return this.effect.call( this, args ); + } + }; + } )( $.fn.show ), + + hide: ( function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "hide"; + return this.effect.call( this, args ); + } + }; + } )( $.fn.hide ), + + toggle: ( function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) || typeof option === "boolean" ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "toggle"; + return this.effect.call( this, args ); + } + }; + } )( $.fn.toggle ), + + cssUnit: function( key ) { + var style = this.css( key ), + val = []; + + $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { + if ( style.indexOf( unit ) > 0 ) { + val = [ parseFloat( style ), unit ]; + } + } ); + return val; + }, + + cssClip: function( clipObj ) { + if ( clipObj ) { + return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " + + clipObj.bottom + "px " + clipObj.left + "px)" ); + } + return parseClip( this.css( "clip" ), this ); + }, + + transfer: function( options, done ) { + var element = $( this ), + target = $( options.to ), + targetFixed = target.css( "position" ) === "fixed", + body = $( "body" ), + fixTop = targetFixed ? body.scrollTop() : 0, + fixLeft = targetFixed ? body.scrollLeft() : 0, + endPosition = target.offset(), + animation = { + top: endPosition.top - fixTop, + left: endPosition.left - fixLeft, + height: target.innerHeight(), + width: target.innerWidth() + }, + startPosition = element.offset(), + transfer = $( "
" ) + .appendTo( "body" ) + .addClass( options.className ) + .css( { + top: startPosition.top - fixTop, + left: startPosition.left - fixLeft, + height: element.innerHeight(), + width: element.innerWidth(), + position: targetFixed ? "fixed" : "absolute" + } ) + .animate( animation, options.duration, options.easing, function() { + transfer.remove(); + if ( $.isFunction( done ) ) { + done(); + } + } ); + } +} ); + +function parseClip( str, element ) { + var outerWidth = element.outerWidth(), + outerHeight = element.outerHeight(), + clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, + values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ]; + + return { + top: parseFloat( values[ 1 ] ) || 0, + right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ), + bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ), + left: parseFloat( values[ 4 ] ) || 0 + }; +} + +$.fx.step.clip = function( fx ) { + if ( !fx.clipInit ) { + fx.start = $( fx.elem ).cssClip(); + if ( typeof fx.end === "string" ) { + fx.end = parseClip( fx.end, fx.elem ); + } + fx.clipInit = true; + } + + $( fx.elem ).cssClip( { + top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top, + right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right, + bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom, + left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left + } ); +}; + +} )(); + +/******************************************************************************/ +/*********************************** EASING ***********************************/ +/******************************************************************************/ + +( function() { + +// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing) + +var baseEasings = {}; + +$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { + baseEasings[ name ] = function( p ) { + return Math.pow( p, i + 2 ); + }; +} ); + +$.extend( baseEasings, { + Sine: function( p ) { + return 1 - Math.cos( p * Math.PI / 2 ); + }, + Circ: function( p ) { + return 1 - Math.sqrt( 1 - p * p ); + }, + Elastic: function( p ) { + return p === 0 || p === 1 ? p : + -Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 ); + }, + Back: function( p ) { + return p * p * ( 3 * p - 2 ); + }, + Bounce: function( p ) { + var pow2, + bounce = 4; + + while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} + return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); + } +} ); + +$.each( baseEasings, function( name, easeIn ) { + $.easing[ "easeIn" + name ] = easeIn; + $.easing[ "easeOut" + name ] = function( p ) { + return 1 - easeIn( 1 - p ); + }; + $.easing[ "easeInOut" + name ] = function( p ) { + return p < 0.5 ? + easeIn( p * 2 ) / 2 : + 1 - easeIn( p * -2 + 2 ) / 2; + }; +} ); + +} )(); + +var effect = $.effects; + + +/*! + * jQuery UI Effects Blind 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Blind Effect +//>>group: Effects +//>>description: Blinds the element. +//>>docs: http://api.jqueryui.com/blind-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, done ) { + var map = { + up: [ "bottom", "top" ], + vertical: [ "bottom", "top" ], + down: [ "top", "bottom" ], + left: [ "right", "left" ], + horizontal: [ "right", "left" ], + right: [ "left", "right" ] + }, + element = $( this ), + direction = options.direction || "up", + start = element.cssClip(), + animate = { clip: $.extend( {}, start ) }, + placeholder = $.effects.createPlaceholder( element ); + + animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ]; + + if ( options.mode === "show" ) { + element.cssClip( animate.clip ); + if ( placeholder ) { + placeholder.css( $.effects.clipToBox( animate ) ); + } + + animate.clip = start; + } + + if ( placeholder ) { + placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing ); + } + + element.animate( animate, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: done + } ); +} ); + + +/*! + * jQuery UI Effects Bounce 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Bounce Effect +//>>group: Effects +//>>description: Bounces an element horizontally or vertically n times. +//>>docs: http://api.jqueryui.com/bounce-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) { + var upAnim, downAnim, refValue, + element = $( this ), + + // Defaults: + mode = options.mode, + hide = mode === "hide", + show = mode === "show", + direction = options.direction || "up", + distance = options.distance, + times = options.times || 5, + + // Number of internal animations + anims = times * 2 + ( show || hide ? 1 : 0 ), + speed = options.duration / anims, + easing = options.easing, + + // Utility: + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + motion = ( direction === "up" || direction === "left" ), + i = 0, + + queuelen = element.queue().length; + + $.effects.createPlaceholder( element ); + + refValue = element.css( ref ); + + // Default distance for the BIGGEST bounce is the outer Distance / 3 + if ( !distance ) { + distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3; + } + + if ( show ) { + downAnim = { opacity: 1 }; + downAnim[ ref ] = refValue; + + // If we are showing, force opacity 0 and set the initial position + // then do the "first" animation + element + .css( "opacity", 0 ) + .css( ref, motion ? -distance * 2 : distance * 2 ) + .animate( downAnim, speed, easing ); + } + + // Start at the smallest distance if we are hiding + if ( hide ) { + distance = distance / Math.pow( 2, times - 1 ); + } + + downAnim = {}; + downAnim[ ref ] = refValue; + + // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here + for ( ; i < times; i++ ) { + upAnim = {}; + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; + + element + .animate( upAnim, speed, easing ) + .animate( downAnim, speed, easing ); + + distance = hide ? distance * 2 : distance / 2; + } + + // Last Bounce when Hiding + if ( hide ) { + upAnim = { opacity: 0 }; + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; + + element.animate( upAnim, speed, easing ); + } + + element.queue( done ); + + $.effects.unshift( element, queuelen, anims + 1 ); +} ); + + +/*! + * jQuery UI Effects Clip 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Clip Effect +//>>group: Effects +//>>description: Clips the element on and off like an old TV. +//>>docs: http://api.jqueryui.com/clip-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectClip = $.effects.define( "clip", "hide", function( options, done ) { + var start, + animate = {}, + element = $( this ), + direction = options.direction || "vertical", + both = direction === "both", + horizontal = both || direction === "horizontal", + vertical = both || direction === "vertical"; + + start = element.cssClip(); + animate.clip = { + top: vertical ? ( start.bottom - start.top ) / 2 : start.top, + right: horizontal ? ( start.right - start.left ) / 2 : start.right, + bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom, + left: horizontal ? ( start.right - start.left ) / 2 : start.left + }; + + $.effects.createPlaceholder( element ); + + if ( options.mode === "show" ) { + element.cssClip( animate.clip ); + animate.clip = start; + } + + element.animate( animate, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: done + } ); + +} ); + + +/*! + * jQuery UI Effects Drop 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Drop Effect +//>>group: Effects +//>>description: Moves an element in one direction and hides it at the same time. +//>>docs: http://api.jqueryui.com/drop-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, done ) { + + var distance, + element = $( this ), + mode = options.mode, + show = mode === "show", + direction = options.direction || "left", + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=", + oppositeMotion = ( motion === "+=" ) ? "-=" : "+=", + animation = { + opacity: 0 + }; + + $.effects.createPlaceholder( element ); + + distance = options.distance || + element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2; + + animation[ ref ] = motion + distance; + + if ( show ) { + element.css( animation ); + + animation[ ref ] = oppositeMotion + distance; + animation.opacity = 1; + } + + // Animate + element.animate( animation, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: done + } ); +} ); + + +/*! + * jQuery UI Effects Explode 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Explode Effect +//>>group: Effects +// jscs:disable maximumLineLength +//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness. +// jscs:enable maximumLineLength +//>>docs: http://api.jqueryui.com/explode-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectExplode = $.effects.define( "explode", "hide", function( options, done ) { + + var i, j, left, top, mx, my, + rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3, + cells = rows, + element = $( this ), + mode = options.mode, + show = mode === "show", + + // Show and then visibility:hidden the element before calculating offset + offset = element.show().css( "visibility", "hidden" ).offset(), + + // Width and height of a piece + width = Math.ceil( element.outerWidth() / cells ), + height = Math.ceil( element.outerHeight() / rows ), + pieces = []; + + // Children animate complete: + function childComplete() { + pieces.push( this ); + if ( pieces.length === rows * cells ) { + animComplete(); + } + } + + // Clone the element for each row and cell. + for ( i = 0; i < rows; i++ ) { // ===> + top = offset.top + i * height; + my = i - ( rows - 1 ) / 2; + + for ( j = 0; j < cells; j++ ) { // ||| + left = offset.left + j * width; + mx = j - ( cells - 1 ) / 2; + + // Create a clone of the now hidden main element that will be absolute positioned + // within a wrapper div off the -left and -top equal to size of our pieces + element + .clone() + .appendTo( "body" ) + .wrap( "
" ) + .css( { + position: "absolute", + visibility: "visible", + left: -j * width, + top: -i * height + } ) + + // Select the wrapper - make it overflow: hidden and absolute positioned based on + // where the original was located +left and +top equal to the size of pieces + .parent() + .addClass( "ui-effects-explode" ) + .css( { + position: "absolute", + overflow: "hidden", + width: width, + height: height, + left: left + ( show ? mx * width : 0 ), + top: top + ( show ? my * height : 0 ), + opacity: show ? 0 : 1 + } ) + .animate( { + left: left + ( show ? 0 : mx * width ), + top: top + ( show ? 0 : my * height ), + opacity: show ? 1 : 0 + }, options.duration || 500, options.easing, childComplete ); + } + } + + function animComplete() { + element.css( { + visibility: "visible" + } ); + $( pieces ).remove(); + done(); + } +} ); + + +/*! + * jQuery UI Effects Fade 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Fade Effect +//>>group: Effects +//>>description: Fades the element. +//>>docs: http://api.jqueryui.com/fade-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, done ) { + var show = options.mode === "show"; + + $( this ) + .css( "opacity", show ? 0 : 1 ) + .animate( { + opacity: show ? 1 : 0 + }, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: done + } ); +} ); + + +/*! + * jQuery UI Effects Fold 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Fold Effect +//>>group: Effects +//>>description: Folds an element first horizontally and then vertically. +//>>docs: http://api.jqueryui.com/fold-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectFold = $.effects.define( "fold", "hide", function( options, done ) { + + // Create element + var element = $( this ), + mode = options.mode, + show = mode === "show", + hide = mode === "hide", + size = options.size || 15, + percent = /([0-9]+)%/.exec( size ), + horizFirst = !!options.horizFirst, + ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ], + duration = options.duration / 2, + + placeholder = $.effects.createPlaceholder( element ), + + start = element.cssClip(), + animation1 = { clip: $.extend( {}, start ) }, + animation2 = { clip: $.extend( {}, start ) }, + + distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ], + + queuelen = element.queue().length; + + if ( percent ) { + size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ]; + } + animation1.clip[ ref[ 0 ] ] = size; + animation2.clip[ ref[ 0 ] ] = size; + animation2.clip[ ref[ 1 ] ] = 0; + + if ( show ) { + element.cssClip( animation2.clip ); + if ( placeholder ) { + placeholder.css( $.effects.clipToBox( animation2 ) ); + } + + animation2.clip = start; + } + + // Animate + element + .queue( function( next ) { + if ( placeholder ) { + placeholder + .animate( $.effects.clipToBox( animation1 ), duration, options.easing ) + .animate( $.effects.clipToBox( animation2 ), duration, options.easing ); + } + + next(); + } ) + .animate( animation1, duration, options.easing ) + .animate( animation2, duration, options.easing ) + .queue( done ); + + $.effects.unshift( element, queuelen, 4 ); +} ); + + +/*! + * jQuery UI Effects Highlight 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Highlight Effect +//>>group: Effects +//>>description: Highlights the background of an element in a defined color for a custom duration. +//>>docs: http://api.jqueryui.com/highlight-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectHighlight = $.effects.define( "highlight", "show", function( options, done ) { + var element = $( this ), + animation = { + backgroundColor: element.css( "backgroundColor" ) + }; + + if ( options.mode === "hide" ) { + animation.opacity = 0; + } + + $.effects.saveStyle( element ); + + element + .css( { + backgroundImage: "none", + backgroundColor: options.color || "#ffff99" + } ) + .animate( animation, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: done + } ); +} ); + + +/*! + * jQuery UI Effects Size 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Size Effect +//>>group: Effects +//>>description: Resize an element to a specified width and height. +//>>docs: http://api.jqueryui.com/size-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectSize = $.effects.define( "size", function( options, done ) { + + // Create element + var baseline, factor, temp, + element = $( this ), + + // Copy for children + cProps = [ "fontSize" ], + vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], + hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], + + // Set options + mode = options.mode, + restore = mode !== "effect", + scale = options.scale || "both", + origin = options.origin || [ "middle", "center" ], + position = element.css( "position" ), + pos = element.position(), + original = $.effects.scaledDimensions( element ), + from = options.from || original, + to = options.to || $.effects.scaledDimensions( element, 0 ); + + $.effects.createPlaceholder( element ); + + if ( mode === "show" ) { + temp = from; + from = to; + to = temp; + } + + // Set scaling factor + factor = { + from: { + y: from.height / original.height, + x: from.width / original.width + }, + to: { + y: to.height / original.height, + x: to.width / original.width + } + }; + + // Scale the css box + if ( scale === "box" || scale === "both" ) { + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + from = $.effects.setTransition( element, vProps, factor.from.y, from ); + to = $.effects.setTransition( element, vProps, factor.to.y, to ); + } + + // Horizontal props scaling + if ( factor.from.x !== factor.to.x ) { + from = $.effects.setTransition( element, hProps, factor.from.x, from ); + to = $.effects.setTransition( element, hProps, factor.to.x, to ); + } + } + + // Scale the content + if ( scale === "content" || scale === "both" ) { + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + from = $.effects.setTransition( element, cProps, factor.from.y, from ); + to = $.effects.setTransition( element, cProps, factor.to.y, to ); + } + } + + // Adjust the position properties based on the provided origin points + if ( origin ) { + baseline = $.effects.getBaseline( origin, original ); + from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top; + from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left; + to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top; + to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left; + } + element.css( from ); + + // Animate the children if desired + if ( scale === "content" || scale === "both" ) { + + vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps ); + hProps = hProps.concat( [ "marginLeft", "marginRight" ] ); + + // Only animate children with width attributes specified + // TODO: is this right? should we include anything with css width specified as well + element.find( "*[width]" ).each( function() { + var child = $( this ), + childOriginal = $.effects.scaledDimensions( child ), + childFrom = { + height: childOriginal.height * factor.from.y, + width: childOriginal.width * factor.from.x, + outerHeight: childOriginal.outerHeight * factor.from.y, + outerWidth: childOriginal.outerWidth * factor.from.x + }, + childTo = { + height: childOriginal.height * factor.to.y, + width: childOriginal.width * factor.to.x, + outerHeight: childOriginal.height * factor.to.y, + outerWidth: childOriginal.width * factor.to.x + }; + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom ); + childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo ); + } + + // Horizontal props scaling + if ( factor.from.x !== factor.to.x ) { + childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom ); + childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo ); + } + + if ( restore ) { + $.effects.saveStyle( child ); + } + + // Animate children + child.css( childFrom ); + child.animate( childTo, options.duration, options.easing, function() { + + // Restore children + if ( restore ) { + $.effects.restoreStyle( child ); + } + } ); + } ); + } + + // Animate + element.animate( to, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: function() { + + var offset = element.offset(); + + if ( to.opacity === 0 ) { + element.css( "opacity", from.opacity ); + } + + if ( !restore ) { + element + .css( "position", position === "static" ? "relative" : position ) + .offset( offset ); + + // Need to save style here so that automatic style restoration + // doesn't restore to the original styles from before the animation. + $.effects.saveStyle( element ); + } + + done(); + } + } ); + +} ); + + +/*! + * jQuery UI Effects Scale 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Scale Effect +//>>group: Effects +//>>description: Grows or shrinks an element and its content. +//>>docs: http://api.jqueryui.com/scale-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectScale = $.effects.define( "scale", function( options, done ) { + + // Create element + var el = $( this ), + mode = options.mode, + percent = parseInt( options.percent, 10 ) || + ( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ), + + newOptions = $.extend( true, { + from: $.effects.scaledDimensions( el ), + to: $.effects.scaledDimensions( el, percent, options.direction || "both" ), + origin: options.origin || [ "middle", "center" ] + }, options ); + + // Fade option to support puff + if ( options.fade ) { + newOptions.from.opacity = 1; + newOptions.to.opacity = 0; + } + + $.effects.effect.size.call( this, newOptions, done ); +} ); + + +/*! + * jQuery UI Effects Puff 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Puff Effect +//>>group: Effects +//>>description: Creates a puff effect by scaling the element up and hiding it at the same time. +//>>docs: http://api.jqueryui.com/puff-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, done ) { + var newOptions = $.extend( true, {}, options, { + fade: true, + percent: parseInt( options.percent, 10 ) || 150 + } ); + + $.effects.effect.scale.call( this, newOptions, done ); +} ); + + +/*! + * jQuery UI Effects Pulsate 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Pulsate Effect +//>>group: Effects +//>>description: Pulsates an element n times by changing the opacity to zero and back. +//>>docs: http://api.jqueryui.com/pulsate-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( options, done ) { + var element = $( this ), + mode = options.mode, + show = mode === "show", + hide = mode === "hide", + showhide = show || hide, + + // Showing or hiding leaves off the "last" animation + anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), + duration = options.duration / anims, + animateTo = 0, + i = 1, + queuelen = element.queue().length; + + if ( show || !element.is( ":visible" ) ) { + element.css( "opacity", 0 ).show(); + animateTo = 1; + } + + // Anims - 1 opacity "toggles" + for ( ; i < anims; i++ ) { + element.animate( { opacity: animateTo }, duration, options.easing ); + animateTo = 1 - animateTo; + } + + element.animate( { opacity: animateTo }, duration, options.easing ); + + element.queue( done ); + + $.effects.unshift( element, queuelen, anims + 1 ); +} ); + + +/*! + * jQuery UI Effects Shake 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Shake Effect +//>>group: Effects +//>>description: Shakes an element horizontally or vertically n times. +//>>docs: http://api.jqueryui.com/shake-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectShake = $.effects.define( "shake", function( options, done ) { + + var i = 1, + element = $( this ), + direction = options.direction || "left", + distance = options.distance || 20, + times = options.times || 3, + anims = times * 2 + 1, + speed = Math.round( options.duration / anims ), + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + positiveMotion = ( direction === "up" || direction === "left" ), + animation = {}, + animation1 = {}, + animation2 = {}, + + queuelen = element.queue().length; + + $.effects.createPlaceholder( element ); + + // Animation + animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance; + animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2; + animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2; + + // Animate + element.animate( animation, speed, options.easing ); + + // Shakes + for ( ; i < times; i++ ) { + element + .animate( animation1, speed, options.easing ) + .animate( animation2, speed, options.easing ); + } + + element + .animate( animation1, speed, options.easing ) + .animate( animation, speed / 2, options.easing ) + .queue( done ); + + $.effects.unshift( element, queuelen, anims + 1 ); +} ); + + +/*! + * jQuery UI Effects Slide 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Slide Effect +//>>group: Effects +//>>description: Slides an element in and out of the viewport. +//>>docs: http://api.jqueryui.com/slide-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectSlide = $.effects.define( "slide", "show", function( options, done ) { + var startClip, startRef, + element = $( this ), + map = { + up: [ "bottom", "top" ], + down: [ "top", "bottom" ], + left: [ "right", "left" ], + right: [ "left", "right" ] + }, + mode = options.mode, + direction = options.direction || "left", + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + positiveMotion = ( direction === "up" || direction === "left" ), + distance = options.distance || + element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ), + animation = {}; + + $.effects.createPlaceholder( element ); + + startClip = element.cssClip(); + startRef = element.position()[ ref ]; + + // Define hide animation + animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef; + animation.clip = element.cssClip(); + animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ]; + + // Reverse the animation if we're showing + if ( mode === "show" ) { + element.cssClip( animation.clip ); + element.css( ref, animation[ ref ] ); + animation.clip = startClip; + animation[ ref ] = startRef; + } + + // Actually animate + element.animate( animation, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: done + } ); +} ); + + +/*! + * jQuery UI Effects Transfer 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Transfer Effect +//>>group: Effects +//>>description: Displays a transfer effect from one element to another. +//>>docs: http://api.jqueryui.com/transfer-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effect; +if ( $.uiBackCompat !== false ) { + effect = $.effects.define( "transfer", function( options, done ) { + $( this ).transfer( options, done ); + } ); +} +var effectsEffectTransfer = effect; + + +/*! + * jQuery UI Focusable 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: :focusable Selector +//>>group: Core +//>>description: Selects elements which can be focused. +//>>docs: http://api.jqueryui.com/focusable-selector/ + + + +// Selectors +$.ui.focusable = function( element, hasTabindex ) { + var map, mapName, img, focusableIfVisible, fieldset, + nodeName = element.nodeName.toLowerCase(); + + if ( "area" === nodeName ) { + map = element.parentNode; + mapName = map.name; + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { + return false; + } + img = $( "img[usemap='#" + mapName + "']" ); + return img.length > 0 && img.is( ":visible" ); + } + + if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) { + focusableIfVisible = !element.disabled; + + if ( focusableIfVisible ) { + + // Form controls within a disabled fieldset are disabled. + // However, controls within the fieldset's legend do not get disabled. + // Since controls generally aren't placed inside legends, we skip + // this portion of the check. + fieldset = $( element ).closest( "fieldset" )[ 0 ]; + if ( fieldset ) { + focusableIfVisible = !fieldset.disabled; + } + } + } else if ( "a" === nodeName ) { + focusableIfVisible = element.href || hasTabindex; + } else { + focusableIfVisible = hasTabindex; + } + + return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) ); +}; + +// Support: IE 8 only +// IE 8 doesn't resolve inherit to visible/hidden for computed values +function visible( element ) { + var visibility = element.css( "visibility" ); + while ( visibility === "inherit" ) { + element = element.parent(); + visibility = element.css( "visibility" ); + } + return visibility !== "hidden"; +} + +$.extend( $.expr[ ":" ], { + focusable: function( element ) { + return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); + } +} ); + +var focusable = $.ui.focusable; + + + + +// Support: IE8 Only +// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop +// with a string, so we need to find the proper form. +var form = $.fn.form = function() { + return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); +}; + + +/*! + * jQuery UI Form Reset Mixin 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Form Reset Mixin +//>>group: Core +//>>description: Refresh input widgets when their form is reset +//>>docs: http://api.jqueryui.com/form-reset-mixin/ + + + +var formResetMixin = $.ui.formResetMixin = { + _formResetHandler: function() { + var form = $( this ); + + // Wait for the form reset to actually happen before refreshing + setTimeout( function() { + var instances = form.data( "ui-form-reset-instances" ); + $.each( instances, function() { + this.refresh(); + } ); + } ); + }, + + _bindFormResetHandler: function() { + this.form = this.element.form(); + if ( !this.form.length ) { + return; + } + + var instances = this.form.data( "ui-form-reset-instances" ) || []; + if ( !instances.length ) { + + // We don't use _on() here because we use a single event handler per form + this.form.on( "reset.ui-form-reset", this._formResetHandler ); + } + instances.push( this ); + this.form.data( "ui-form-reset-instances", instances ); + }, + + _unbindFormResetHandler: function() { + if ( !this.form.length ) { + return; + } + + var instances = this.form.data( "ui-form-reset-instances" ); + instances.splice( $.inArray( this, instances ), 1 ); + if ( instances.length ) { + this.form.data( "ui-form-reset-instances", instances ); + } else { + this.form + .removeData( "ui-form-reset-instances" ) + .off( "reset.ui-form-reset" ); + } + } +}; + + +/*! + * jQuery UI Support for jQuery core 1.7.x 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + */ + +//>>label: jQuery 1.7 Support +//>>group: Core +//>>description: Support version 1.7.x of jQuery core + + + +// Support: jQuery 1.7 only +// Not a great way to check versions, but since we only support 1.7+ and only +// need to detect <1.8, this is a simple check that should suffice. Checking +// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0 +// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting +// 1.7 anymore). See #11197 for why we're not using feature detection. +if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) { + + // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight() + // Unlike jQuery Core 1.8+, these only support numeric values to set the + // dimensions in pixels + $.each( [ "Width", "Height" ], function( i, name ) { + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], + type = name.toLowerCase(), + orig = { + innerWidth: $.fn.innerWidth, + innerHeight: $.fn.innerHeight, + outerWidth: $.fn.outerWidth, + outerHeight: $.fn.outerHeight + }; + + function reduce( elem, size, border, margin ) { + $.each( side, function() { + size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; + if ( border ) { + size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; + } + if ( margin ) { + size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; + } + } ); + return size; + } + + $.fn[ "inner" + name ] = function( size ) { + if ( size === undefined ) { + return orig[ "inner" + name ].call( this ); + } + + return this.each( function() { + $( this ).css( type, reduce( this, size ) + "px" ); + } ); + }; + + $.fn[ "outer" + name ] = function( size, margin ) { + if ( typeof size !== "number" ) { + return orig[ "outer" + name ].call( this, size ); + } + + return this.each( function() { + $( this ).css( type, reduce( this, size, true, margin ) + "px" ); + } ); + }; + } ); + + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +; +/*! + * jQuery UI Keycode 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Keycode +//>>group: Core +//>>description: Provide keycodes as keynames +//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/ + + +var keycode = $.ui.keyCode = { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 +}; + + + + +// Internal use only +var escapeSelector = $.ui.escapeSelector = ( function() { + var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; + return function( selector ) { + return selector.replace( selectorEscape, "\\$1" ); + }; +} )(); + + +/*! + * jQuery UI Labels 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: labels +//>>group: Core +//>>description: Find all the labels associated with a given input +//>>docs: http://api.jqueryui.com/labels/ + + + +var labels = $.fn.labels = function() { + var ancestor, selector, id, labels, ancestors; + + // Check control.labels first + if ( this[ 0 ].labels && this[ 0 ].labels.length ) { + return this.pushStack( this[ 0 ].labels ); + } + + // Support: IE <= 11, FF <= 37, Android <= 2.3 only + // Above browsers do not support control.labels. Everything below is to support them + // as well as document fragments. control.labels does not work on document fragments + labels = this.eq( 0 ).parents( "label" ); + + // Look for the label based on the id + id = this.attr( "id" ); + if ( id ) { + + // We don't search against the document in case the element + // is disconnected from the DOM + ancestor = this.eq( 0 ).parents().last(); + + // Get a full set of top level ancestors + ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() ); + + // Create a selector for the label based on the id + selector = "label[for='" + $.ui.escapeSelector( id ) + "']"; + + labels = labels.add( ancestors.find( selector ).addBack( selector ) ); + + } + + // Return whatever we have found for labels + return this.pushStack( labels ); +}; + + +/*! + * jQuery UI Scroll Parent 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: scrollParent +//>>group: Core +//>>description: Get the closest ancestor element that is scrollable. +//>>docs: http://api.jqueryui.com/scrollParent/ + + + +var scrollParent = $.fn.scrollParent = function( includeHidden ) { + var position = this.css( "position" ), + excludeStaticParent = position === "absolute", + overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, + scrollParent = this.parents().filter( function() { + var parent = $( this ); + if ( excludeStaticParent && parent.css( "position" ) === "static" ) { + return false; + } + return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + + parent.css( "overflow-x" ) ); + } ).eq( 0 ); + + return position === "fixed" || !scrollParent.length ? + $( this[ 0 ].ownerDocument || document ) : + scrollParent; +}; + + +/*! + * jQuery UI Tabbable 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: :tabbable Selector +//>>group: Core +//>>description: Selects elements which can be tabbed to. +//>>docs: http://api.jqueryui.com/tabbable-selector/ + + + +var tabbable = $.extend( $.expr[ ":" ], { + tabbable: function( element ) { + var tabIndex = $.attr( element, "tabindex" ), + hasTabindex = tabIndex != null; + return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex ); + } +} ); + + +/*! + * jQuery UI Unique ID 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: uniqueId +//>>group: Core +//>>description: Functions to generate and remove uniqueId's +//>>docs: http://api.jqueryui.com/uniqueId/ + + + +var uniqueId = $.fn.extend( { + uniqueId: ( function() { + var uuid = 0; + + return function() { + return this.each( function() { + if ( !this.id ) { + this.id = "ui-id-" + ( ++uuid ); + } + } ); + }; + } )(), + + removeUniqueId: function() { + return this.each( function() { + if ( /^ui-id-\d+$/.test( this.id ) ) { + $( this ).removeAttr( "id" ); + } + } ); + } +} ); + + +/*! + * jQuery UI Accordion 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Accordion +//>>group: Widgets +// jscs:disable maximumLineLength +//>>description: Displays collapsible content panels for presenting information in a limited amount of space. +// jscs:enable maximumLineLength +//>>docs: http://api.jqueryui.com/accordion/ +//>>demos: http://jqueryui.com/accordion/ +//>>css.structure: ../../themes/base/core.css +//>>css.structure: ../../themes/base/accordion.css +//>>css.theme: ../../themes/base/theme.css + + + +var widgetsAccordion = $.widget( "ui.accordion", { + version: "1.12.1", + options: { + active: 0, + animate: {}, + classes: { + "ui-accordion-header": "ui-corner-top", + "ui-accordion-header-collapsed": "ui-corner-all", + "ui-accordion-content": "ui-corner-bottom" + }, + collapsible: false, + event: "click", + header: "> li > :first-child, > :not(li):even", + heightStyle: "auto", + icons: { + activeHeader: "ui-icon-triangle-1-s", + header: "ui-icon-triangle-1-e" + }, + + // Callbacks + activate: null, + beforeActivate: null + }, + + hideProps: { + borderTopWidth: "hide", + borderBottomWidth: "hide", + paddingTop: "hide", + paddingBottom: "hide", + height: "hide" + }, + + showProps: { + borderTopWidth: "show", + borderBottomWidth: "show", + paddingTop: "show", + paddingBottom: "show", + height: "show" + }, + + _create: function() { + var options = this.options; + + this.prevShow = this.prevHide = $(); + this._addClass( "ui-accordion", "ui-widget ui-helper-reset" ); + this.element.attr( "role", "tablist" ); + + // Don't allow collapsible: false and active: false / null + if ( !options.collapsible && ( options.active === false || options.active == null ) ) { + options.active = 0; + } + + this._processPanels(); + + // handle negative values + if ( options.active < 0 ) { + options.active += this.headers.length; + } + this._refresh(); + }, + + _getCreateEventData: function() { + return { + header: this.active, + panel: !this.active.length ? $() : this.active.next() + }; + }, + + _createIcons: function() { + var icon, children, + icons = this.options.icons; + + if ( icons ) { + icon = $( "" ); + this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header ); + icon.prependTo( this.headers ); + children = this.active.children( ".ui-accordion-header-icon" ); + this._removeClass( children, icons.header ) + ._addClass( children, null, icons.activeHeader ) + ._addClass( this.headers, "ui-accordion-icons" ); + } + }, + + _destroyIcons: function() { + this._removeClass( this.headers, "ui-accordion-icons" ); + this.headers.children( ".ui-accordion-header-icon" ).remove(); + }, + + _destroy: function() { + var contents; + + // Clean up main element + this.element.removeAttr( "role" ); + + // Clean up headers + this.headers + .removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" ) + .removeUniqueId(); + + this._destroyIcons(); + + // Clean up content panels + contents = this.headers.next() + .css( "display", "" ) + .removeAttr( "role aria-hidden aria-labelledby" ) + .removeUniqueId(); + + if ( this.options.heightStyle !== "content" ) { + contents.css( "height", "" ); + } + }, + + _setOption: function( key, value ) { + if ( key === "active" ) { + + // _activate() will handle invalid values and update this.options + this._activate( value ); + return; + } + + if ( key === "event" ) { + if ( this.options.event ) { + this._off( this.headers, this.options.event ); + } + this._setupEvents( value ); + } + + this._super( key, value ); + + // Setting collapsible: false while collapsed; open first panel + if ( key === "collapsible" && !value && this.options.active === false ) { + this._activate( 0 ); + } + + if ( key === "icons" ) { + this._destroyIcons(); + if ( value ) { + this._createIcons(); + } + } + }, + + _setOptionDisabled: function( value ) { + this._super( value ); + + this.element.attr( "aria-disabled", value ); + + // Support: IE8 Only + // #5332 / #6059 - opacity doesn't cascade to positioned elements in IE + // so we need to add the disabled class to the headers and panels + this._toggleClass( null, "ui-state-disabled", !!value ); + this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled", + !!value ); + }, + + _keydown: function( event ) { + if ( event.altKey || event.ctrlKey ) { + return; + } + + var keyCode = $.ui.keyCode, + length = this.headers.length, + currentIndex = this.headers.index( event.target ), + toFocus = false; + + switch ( event.keyCode ) { + case keyCode.RIGHT: + case keyCode.DOWN: + toFocus = this.headers[ ( currentIndex + 1 ) % length ]; + break; + case keyCode.LEFT: + case keyCode.UP: + toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; + break; + case keyCode.SPACE: + case keyCode.ENTER: + this._eventHandler( event ); + break; + case keyCode.HOME: + toFocus = this.headers[ 0 ]; + break; + case keyCode.END: + toFocus = this.headers[ length - 1 ]; + break; + } + + if ( toFocus ) { + $( event.target ).attr( "tabIndex", -1 ); + $( toFocus ).attr( "tabIndex", 0 ); + $( toFocus ).trigger( "focus" ); + event.preventDefault(); + } + }, + + _panelKeyDown: function( event ) { + if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { + $( event.currentTarget ).prev().trigger( "focus" ); + } + }, + + refresh: function() { + var options = this.options; + this._processPanels(); + + // Was collapsed or no panel + if ( ( options.active === false && options.collapsible === true ) || + !this.headers.length ) { + options.active = false; + this.active = $(); + + // active false only when collapsible is true + } else if ( options.active === false ) { + this._activate( 0 ); + + // was active, but active panel is gone + } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + + // all remaining panel are disabled + if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) { + options.active = false; + this.active = $(); + + // activate previous panel + } else { + this._activate( Math.max( 0, options.active - 1 ) ); + } + + // was active, active panel still exists + } else { + + // make sure active index is correct + options.active = this.headers.index( this.active ); + } + + this._destroyIcons(); + + this._refresh(); + }, + + _processPanels: function() { + var prevHeaders = this.headers, + prevPanels = this.panels; + + this.headers = this.element.find( this.options.header ); + this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed", + "ui-state-default" ); + + this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide(); + this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" ); + + // Avoid memory leaks (#10056) + if ( prevPanels ) { + this._off( prevHeaders.not( this.headers ) ); + this._off( prevPanels.not( this.panels ) ); + } + }, + + _refresh: function() { + var maxHeight, + options = this.options, + heightStyle = options.heightStyle, + parent = this.element.parent(); + + this.active = this._findActive( options.active ); + this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" ) + ._removeClass( this.active, "ui-accordion-header-collapsed" ); + this._addClass( this.active.next(), "ui-accordion-content-active" ); + this.active.next().show(); + + this.headers + .attr( "role", "tab" ) + .each( function() { + var header = $( this ), + headerId = header.uniqueId().attr( "id" ), + panel = header.next(), + panelId = panel.uniqueId().attr( "id" ); + header.attr( "aria-controls", panelId ); + panel.attr( "aria-labelledby", headerId ); + } ) + .next() + .attr( "role", "tabpanel" ); + + this.headers + .not( this.active ) + .attr( { + "aria-selected": "false", + "aria-expanded": "false", + tabIndex: -1 + } ) + .next() + .attr( { + "aria-hidden": "true" + } ) + .hide(); + + // Make sure at least one header is in the tab order + if ( !this.active.length ) { + this.headers.eq( 0 ).attr( "tabIndex", 0 ); + } else { + this.active.attr( { + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + } ) + .next() + .attr( { + "aria-hidden": "false" + } ); + } + + this._createIcons(); + + this._setupEvents( options.event ); + + if ( heightStyle === "fill" ) { + maxHeight = parent.height(); + this.element.siblings( ":visible" ).each( function() { + var elem = $( this ), + position = elem.css( "position" ); + + if ( position === "absolute" || position === "fixed" ) { + return; + } + maxHeight -= elem.outerHeight( true ); + } ); + + this.headers.each( function() { + maxHeight -= $( this ).outerHeight( true ); + } ); + + this.headers.next() + .each( function() { + $( this ).height( Math.max( 0, maxHeight - + $( this ).innerHeight() + $( this ).height() ) ); + } ) + .css( "overflow", "auto" ); + } else if ( heightStyle === "auto" ) { + maxHeight = 0; + this.headers.next() + .each( function() { + var isVisible = $( this ).is( ":visible" ); + if ( !isVisible ) { + $( this ).show(); + } + maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); + if ( !isVisible ) { + $( this ).hide(); + } + } ) + .height( maxHeight ); + } + }, + + _activate: function( index ) { + var active = this._findActive( index )[ 0 ]; + + // Trying to activate the already active panel + if ( active === this.active[ 0 ] ) { + return; + } + + // Trying to collapse, simulate a click on the currently active header + active = active || this.active[ 0 ]; + + this._eventHandler( { + target: active, + currentTarget: active, + preventDefault: $.noop + } ); + }, + + _findActive: function( selector ) { + return typeof selector === "number" ? this.headers.eq( selector ) : $(); + }, + + _setupEvents: function( event ) { + var events = { + keydown: "_keydown" + }; + if ( event ) { + $.each( event.split( " " ), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + } ); + } + + this._off( this.headers.add( this.headers.next() ) ); + this._on( this.headers, events ); + this._on( this.headers.next(), { keydown: "_panelKeyDown" } ); + this._hoverable( this.headers ); + this._focusable( this.headers ); + }, + + _eventHandler: function( event ) { + var activeChildren, clickedChildren, + options = this.options, + active = this.active, + clicked = $( event.currentTarget ), + clickedIsActive = clicked[ 0 ] === active[ 0 ], + collapsing = clickedIsActive && options.collapsible, + toShow = collapsing ? $() : clicked.next(), + toHide = active.next(), + eventData = { + oldHeader: active, + oldPanel: toHide, + newHeader: collapsing ? $() : clicked, + newPanel: toShow + }; + + event.preventDefault(); + + if ( + + // click on active header, but not collapsible + ( clickedIsActive && !options.collapsible ) || + + // allow canceling activation + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { + return; + } + + options.active = collapsing ? false : this.headers.index( clicked ); + + // When the call to ._toggle() comes after the class changes + // it causes a very odd bug in IE 8 (see #6720) + this.active = clickedIsActive ? $() : clicked; + this._toggle( eventData ); + + // Switch classes + // corner classes on the previously active header stay after the animation + this._removeClass( active, "ui-accordion-header-active", "ui-state-active" ); + if ( options.icons ) { + activeChildren = active.children( ".ui-accordion-header-icon" ); + this._removeClass( activeChildren, null, options.icons.activeHeader ) + ._addClass( activeChildren, null, options.icons.header ); + } + + if ( !clickedIsActive ) { + this._removeClass( clicked, "ui-accordion-header-collapsed" ) + ._addClass( clicked, "ui-accordion-header-active", "ui-state-active" ); + if ( options.icons ) { + clickedChildren = clicked.children( ".ui-accordion-header-icon" ); + this._removeClass( clickedChildren, null, options.icons.header ) + ._addClass( clickedChildren, null, options.icons.activeHeader ); + } + + this._addClass( clicked.next(), "ui-accordion-content-active" ); + } + }, + + _toggle: function( data ) { + var toShow = data.newPanel, + toHide = this.prevShow.length ? this.prevShow : data.oldPanel; + + // Handle activating a panel during the animation for another activation + this.prevShow.add( this.prevHide ).stop( true, true ); + this.prevShow = toShow; + this.prevHide = toHide; + + if ( this.options.animate ) { + this._animate( toShow, toHide, data ); + } else { + toHide.hide(); + toShow.show(); + this._toggleComplete( data ); + } + + toHide.attr( { + "aria-hidden": "true" + } ); + toHide.prev().attr( { + "aria-selected": "false", + "aria-expanded": "false" + } ); + + // if we're switching panels, remove the old header from the tab order + // if we're opening from collapsed state, remove the previous header from the tab order + // if we're collapsing, then keep the collapsing header in the tab order + if ( toShow.length && toHide.length ) { + toHide.prev().attr( { + "tabIndex": -1, + "aria-expanded": "false" + } ); + } else if ( toShow.length ) { + this.headers.filter( function() { + return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0; + } ) + .attr( "tabIndex", -1 ); + } + + toShow + .attr( "aria-hidden", "false" ) + .prev() + .attr( { + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + } ); + }, + + _animate: function( toShow, toHide, data ) { + var total, easing, duration, + that = this, + adjust = 0, + boxSizing = toShow.css( "box-sizing" ), + down = toShow.length && + ( !toHide.length || ( toShow.index() < toHide.index() ) ), + animate = this.options.animate || {}, + options = down && animate.down || animate, + complete = function() { + that._toggleComplete( data ); + }; + + if ( typeof options === "number" ) { + duration = options; + } + if ( typeof options === "string" ) { + easing = options; + } + + // fall back from options to animation in case of partial down settings + easing = easing || options.easing || animate.easing; + duration = duration || options.duration || animate.duration; + + if ( !toHide.length ) { + return toShow.animate( this.showProps, duration, easing, complete ); + } + if ( !toShow.length ) { + return toHide.animate( this.hideProps, duration, easing, complete ); + } + + total = toShow.show().outerHeight(); + toHide.animate( this.hideProps, { + duration: duration, + easing: easing, + step: function( now, fx ) { + fx.now = Math.round( now ); + } + } ); + toShow + .hide() + .animate( this.showProps, { + duration: duration, + easing: easing, + complete: complete, + step: function( now, fx ) { + fx.now = Math.round( now ); + if ( fx.prop !== "height" ) { + if ( boxSizing === "content-box" ) { + adjust += fx.now; + } + } else if ( that.options.heightStyle !== "content" ) { + fx.now = Math.round( total - toHide.outerHeight() - adjust ); + adjust = 0; + } + } + } ); + }, + + _toggleComplete: function( data ) { + var toHide = data.oldPanel, + prev = toHide.prev(); + + this._removeClass( toHide, "ui-accordion-content-active" ); + this._removeClass( prev, "ui-accordion-header-active" ) + ._addClass( prev, "ui-accordion-header-collapsed" ); + + // Work around for rendering bug in IE (#5421) + if ( toHide.length ) { + toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className; + } + this._trigger( "activate", null, data ); + } +} ); + + + +var safeActiveElement = $.ui.safeActiveElement = function( document ) { + var activeElement; + + // Support: IE 9 only + // IE9 throws an "Unspecified error" accessing document.activeElement from an