Index: core/admin_templates/incs/header.tpl IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/admin_templates/incs/header.tpl (revision 15987) +++ core/admin_templates/incs/header.tpl (revision ) @@ -20,6 +20,7 @@ ' . kUtil::escape($title, kUtil::ESCAPE_HTML) . ''; + } + } + else { + foreach ($data as $title) { + echo '' . kUtil::escape($title, kUtil::ESCAPE_HTML) . ''; + } + } + + echo ''; + } + + /** + * Returns auto-complete values for jQueryUI.AutoComplete + * + * @param kEvent $event + * @return void + * @access protected + */ + protected function OnSuggestValuesJSON(kEvent $event) + { + $event->status = kEvent::erSTOP; + + $data = $this->getAutoCompleteSuggestions($event, $this->Application->GetVar('term')); + + if ( kUtil::isAssoc($data) ) { + $transformed_data = array(); + + foreach ($data as $key => $title) { + $transformed_data[] = array('value' => $key, 'label' => $title); + } + + $data = $transformed_data; + } + + echo json_encode($data); + } + + /** + * Prepares a suggestion list based on a given term. + * + * @param kEvent $event Event. + * @param string $term Term. + * + * @return Array + * @access protected + */ + protected function getAutoCompleteSuggestions(kEvent $event, $term) + { $object = $event->getObject(); + /* @var $object kDBItem */ - if ( !$field || !$cur_value || !$object->isField($field) ) { - return; + $field = $this->Application->GetVar('field'); + + if ( !$field || !$term || !$object->isField($field) ) { + return array(); } $limit = $this->Application->GetVar('limit'); + if ( !$limit ) { $limit = 20; } $sql = 'SELECT DISTINCT ' . $field . ' FROM ' . $event->getUnitConfig()->getTableName() . ' - WHERE ' . $field . ' LIKE ' . $this->Conn->qstr($cur_value . '%') . ' + WHERE ' . $field . ' LIKE ' . $this->Conn->qstr($term . '%') . ' ORDER BY ' . $field . ' LIMIT 0,' . $limit; - $data = $this->Conn->GetCol($sql); - $this->Application->XMLHeader(); - - echo ''; - - foreach ($data as $item) { - echo '' . kUtil::escape($item, kUtil::ESCAPE_HTML) . ''; - } - - echo ''; + return $this->Conn->GetCol($sql); } /** \ No newline at end of file Index: core/admin_templates/js/jquery/ui-lightness/jquery-ui-1.10.3.custom.css IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/admin_templates/js/jquery/ui-lightness/jquery-ui-1.10.3.custom.css (revision ) +++ core/admin_templates/js/jquery/ui-lightness/jquery-ui-1.10.3.custom.css (revision ) @@ -0,0 +1,624 @@ +/*! jQuery UI - v1.10.3 - 2013-10-08 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.autocomplete.css, jquery.ui.menu.css, jquery.ui.theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px +* Copyright 2013 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-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; +} +.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-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-menu { + list-style: none; + padding: 2px; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + margin-top: -3px; + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + padding: 0; + width: 100%; + /* support: IE10, see #8844 */ + list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); +} +.ui-menu .ui-menu-divider { + margin: 5px -2px 5px -2px; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-menu-item a { + text-decoration: none; + display: block; + padding: 2px .4em; + line-height: 1.5; + min-height: 0; /* support: IE7 */ + font-weight: normal; +} +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} + +.ui-menu .ui-state-disabled { + font-weight: normal; + margin: .4em 0 .2em; + line-height: 1.5; +} +.ui-menu .ui-state-disabled a { + cursor: default; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item a { + position: relative; + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: .2em; + left: .2em; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + position: static; + float: right; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #dddddd; + background: #eeeeee url(@templates_base@/js/jquery/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #e78f08; + background: #f6a828 url(@templates_base@/js/jquery/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; + color: #ffffff; + font-weight: bold; +} +.ui-widget-header a { + color: #ffffff; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #f6f6f6 url(@templates_base@/js/jquery/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; + font-weight: bold; + color: #1c94c4; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #1c94c4; + 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 { + border: 1px solid #fbcb09; + background: #fdf5ce url(@templates_base@/js/jquery/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; + font-weight: bold; + color: #c77405; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited { + color: #c77405; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #fbd850; + background: #ffffff url(@templates_base@/js/jquery/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; + font-weight: bold; + color: #eb8f00; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #eb8f00; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fed22f; + background: #ffe45c url(@templates_base@/js/jquery/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #b81900 url(@templates_base@/js/jquery/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.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); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* For IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url(@templates_base@/js/jquery/ui-lightness/images/ui-icons_222222_256x240.png); +} +.ui-widget-header .ui-icon { + background-image: url(@templates_base@/js/jquery/ui-lightness/images/ui-icons_ffffff_256x240.png); +} +.ui-state-default .ui-icon { + background-image: url(@templates_base@/js/jquery/ui-lightness/images/ui-icons_ef8c08_256x240.png); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url(@templates_base@/js/jquery/ui-lightness/images/ui-icons_ef8c08_256x240.png); +} +.ui-state-active .ui-icon { + background-image: url(@templates_base@/js/jquery/ui-lightness/images/ui-icons_ef8c08_256x240.png); +} +.ui-state-highlight .ui-icon { + background-image: url(@templates_base@/js/jquery/ui-lightness/images/ui-icons_228ef1_256x240.png); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url(@templates_base@/js/jquery/ui-lightness/images/ui-icons_ffd27a_256x240.png); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-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: -64px -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: -64px -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: 0 -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: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #666666 url(@templates_base@/js/jquery/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; + opacity: .5; + filter: Alpha(Opacity=50); +} +.ui-widget-shadow { + margin: -5px 0 0 -5px; + padding: 5px; + background: #000000 url(@templates_base@/js/jquery/ui-lightness/images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; + opacity: .2; + filter: Alpha(Opacity=20); + border-radius: 5px; +} Index: core/units/email_templates/email_templates_config.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/email_templates/email_templates_config.php (revision 15987) +++ core/units/email_templates/email_templates_config.php (revision ) @@ -250,7 +250,7 @@ ), 'Fields' => Array ( 'TemplateId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'TemplateName' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ), + 'TemplateName' => Array ('filter_block' => 'grid_like_combo_filter', 'width' => 250, ), 'Subject' => Array ('filter_block' => 'grid_like_filter', 'no_special' => 0, 'width' => 300, ), 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ), 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 60, ), \ No newline at end of file Index: core/kernel/globals.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/globals.php (revision 15987) +++ core/kernel/globals.php (revision ) @@ -53,6 +53,19 @@ public static $escapeStrategy = self::ESCAPE_HTML; /** + * Checks, that given array is associative. + * + * @param array $array Array. + * + * @return bool + * @access public + */ + public static function isAssoc($array) + { + return array_keys($array) !== range(0, count($array) - 1); + } + + /** * Similar to array_merge_recursive but keyed-valued are always overwritten. * Priority goes to the 2nd array. * \ No newline at end of file Index: core/units/configuration/configuration_event_handler.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/configuration/configuration_event_handler.php (revision 15987) +++ core/units/configuration/configuration_event_handler.php (revision ) @@ -473,43 +473,42 @@ /** * Returns auto-complete values for ajax-dropdown * - * @param kEvent $event - * @return void + * @param kEvent $event Event. + * @param string $term Term. + * + * @return Array * @access protected */ - protected function OnSuggestValues(kEvent $event) + protected function getAutoCompleteSuggestions(kEvent $event, $term) { - $event->status = kEvent::erSTOP; - - $field = $this->Application->GetVar('field'); - $cur_value = $this->Application->GetVar('cur_value'); - $object = $event->getObject(); /* @var $object kDBItem */ - if ( !$field || !$cur_value || !$object->isField($field) ) { - return; + $field = $this->Application->GetVar('field'); + + if ( !$field || !$term || !$object->isField($field) ) { + return array(); } $limit = $this->Application->GetVar('limit'); + if ( !$limit ) { $limit = 20; } $sql = 'SELECT DISTINCT ' . $field . ', ModuleOwner FROM ' . $event->getUnitConfig()->getTableName() . ' - WHERE ' . $field . ' LIKE ' . $this->Conn->qstr('%' . $cur_value . '%') . ' + WHERE ' . $field . ' LIKE ' . $this->Conn->qstr('%' . $term . '%') . ' ORDER BY ' . $field . ' ASC'; - $raw_suggestions = $this->Conn->Query($sql); + $data = $this->Conn->Query($sql); - $suggestions = Array (); - $this->Application->XMLHeader(); + $suggestions = array(); - foreach ($raw_suggestions as $raw_suggestion) { + foreach ($data as $raw_suggestion) { $suggestion = $raw_suggestion[$field]; if ( !isset($suggestions[$suggestion]) ) { - $suggestions[$suggestion] = Array (); + $suggestions[$suggestion] = array(); } $suggestions[$suggestion][] = $raw_suggestion['ModuleOwner']; @@ -517,17 +516,17 @@ array_splice($suggestions, $limit); - echo ''; + $ret = array(); $of_label = $this->Application->Phrase('la_From', false); foreach ($suggestions as $suggestion_value => $suggestion_modules) { $suggestion_module = in_array('In-Portal', $suggestion_modules) ? 'In-Portal' : implode(', ', $suggestion_modules); $suggestion_title = $suggestion_value . ' ' . $of_label . ' ' . $suggestion_module . ''; - echo '' . kUtil::escape($suggestion_title, kUtil::ESCAPE_HTML) . ''; + $ret[$suggestion_value] = $suggestion_title; } - echo ''; + return $ret; } /** \ No newline at end of file Index: core/admin_templates/js/ajax_dropdown.js =================================================================== --- core/admin_templates/js/ajax_dropdown.js (revision 15987) +++ core/admin_templates/js/ajax_dropdown.js (revision 15987) @@ -1,556 +0,0 @@ -/* -(c) Intechnic Europe 2007 http://www.intechnic.lv -Author: Konstantin Tjuterev - -The class adds a dynamic drop-down to the edit-box -Usage: - -
-
- - -The AJAXDropDown constructor takes the following arguments: - input_id - id of textbox to attach to - suggest_url_callback - function which should return URL which returns XML of suggested values, - function takes one argument - it is current value of the text_box - [get_value_callback] - optional argument - function which returns the value to be set in the textbox, - based on currently selected item (out of suggested). If the argument is skipped - the node value of - element will be used as the value - element in the suggestions XML may have unlimited number of attribuets, all the attributes will be set - to the corresponding DIV element and this DIV element will be passed as argument to the get_value_callback, - so one may use the argument to alter the value set into textbox as in the example above - -Response XML structure: - The script will look for ALL elements with tagname = 'item', so basically the structure should look like this: - - - Suggestion 1 - Suggestion 2 - Suggestion 3 - - -Design & CSS - The script will automatically display a div which width will match the width of the text-box - You may control the div look by changing .suggest-box CSS selector - The items inside the box will have .suggest-item and .suggest-item-over - - The default styles which may be used is: - - - -*/ - - -function AJAXDropDown(input_id, suggest_url_callback, get_value_callback, $custom_params) { - this.useTags = false; - this.maxWidth = false; - - if ($custom_params !== undefined) { - $.extend(this, $custom_params); - } - - this.Input = document.getElementById(input_id); - - if (!$( jq('#div_' + input_id) ).length) { - $('
').appendTo('body'); // .insertAfter(this.Input); - } - - this.Box = document.getElementById("div_"+input_id); - this.KeyUpWaiting = false; - this.KeyUpTimer = false; - this.SuggestURLCallback = suggest_url_callback; - this.GetValueCallback = $.isFunction(get_value_callback) ? get_value_callback : this.GetValue; - this.BoxOpen = false; - this.SelectedItem = false; - - var obj = this; - - $(document).ready( - function() { - obj.Init() - } - ); - - if (this.useTags) { - this.tagValue = ''; - this.prevTagValue = ''; - this.tags = {}; - this.saveTagPos = 0; - this.newCaretPos = 0; - this.originalCaretPos = 0; - } -} - -AJAXDropDown.prototype.Init = function() { - // draw box - // this.Box = document.createElement('DIV'); - // document.body.appendChild(this.Box); - // this.Box = addElement(this.Input.parentNode, 'div'); - - this.Box.style.display = 'none'; - this.Box.style.zIndex = 99; - this.Box.style.position = 'absolute'; - this.Box.style.overflow = 'auto'; - this.Box.className = 'suggest-box'; - - // add onkeyup - var obj = this; - - $(this.Input) - .attr('autocomplete', 'off') - .keydown ( - function($e) { - if ($e.keyCode == 13) { - return false; - } - } - ) - .keyup ( function(ev) { obj.KeyUp(ev) } ) - .blur ( function(ev) { obj.Blur(ev) } ); - - $(this.Box) - .scroll( - function(ev) { - if (obj.BlurWaiting) { - window.clearTimeout(obj.BlurTimer); - } - } - ) - .mouseup( function(ev) { obj.BlurWaiting = false } ); -} - -AJAXDropDown.prototype.Blur = function(ev) { - if (this.BlurWaiting) { - return; - } - - var obj = this; - this.BlurWaiting = true; - - this.BlurTimer = window.setTimeout( - function() { - obj.CloseBox(); - this.BlurWaiting = false; - }, 300 - ); -} - -AJAXDropDown.prototype.KeyUp = function(e) { - switch (e.keyCode) { - case 38: //arrow up - if (!this.BoxOpen) { - break; - } - this.SelectPrev(); - break; - - case 40: //arrow down - if (!this.BoxOpen) { - break; - } - this.SelectNext(); - break; - - case 27: //Escape - if (this.BoxOpen) { - this.Input.value = this.OriginalValue; - - if (this.useTags) { - this.setCaretPosition(this.originalCaretPos); - } - - this.CloseBox(); - } - break; - case 13: //Enter - this.CloseBox(); - break; - - default: -// if (this.Input.value == '') return; - if (this.useTags) { - this.setTagValue(); - } - - var obj = this; - if (this.KeyUpWaiting && this.KeyUpTimer) { - window.clearTimeout(this.KeyUpTimer); - this.KeyUpTimer = false; - } - - this.KeyUpWaiting = true; - this.KeyUpTimer = window.setTimeout( - function() { - obj.RequestSuggestions(); - }, 300 - ); - } -} - -AJAXDropDown.prototype.parseTagString = function(tag_string) { - var value_end = tag_string.match(/[ ]*$/)[0]; - tag_string += ','; - - var rex = new RegExp("(^[ ]*\|[ ]*,[ ]*)", "g"); - var separators = tag_string.match(rex); - - var start = 0; - var end = 0; - - for (var i = 0; i < separators.length - 1; i++) { - the_tag = tag_string.substring(0, tag_string.search(/[ ]*,[ ]*/)).replace(rex.compile('^' + separators[i]), ''); - - this.tags[i] = { - 'separator' : separators[i], - 'tag' : the_tag, - 'start' : start, - 'end' : end + the_tag.length - } - - start += the_tag.length + separators[i + 1].length; - end += the_tag.length + separators[i + 1].length; - tag_string = tag_string.substring(tag_string.search(/[ ]*,[ ]*/) + separators[i+1].length); - } - - this.tags['count'] = i; - this.tags['value_end'] = value_end; -} - - -AJAXDropDown.prototype.getCaretPosition = function() { - var element = this.Input; - - if (document.selection) { - // The current selection - var range = document.selection.createRange(); - // We'll use this as a 'dummy' - var stored_range = range.duplicate(); - // Select all text - stored_range.moveToElementText(element); - // Now move 'dummy' end point to end point of original range - stored_range.setEndPoint('EndToEnd', range); - // Now we can calculate start and end points - element.selectionStart = stored_range.text.length - range.text.length; - element.selectionEnd = element.selectionStart + range.text.length; - } - - return element.selectionEnd; -} - -AJAXDropDown.prototype.setCaretPosition = function(caretPos) { - if (this.Input.createTextRange) { - var range = this.Input.createTextRange(); - range.move('character', caretPos); - range.select(); - } - else { - if (this.Input.selectionStart) { - this.Input.focus(); - this.Input.setSelectionRange(caretPos, caretPos); - } - else { - this.Input.focus(); - } - } -} - -AJAXDropDown.prototype.setTagValue = function() { - var endPos = this.getCaretPosition(); - - this.parseTagString(this.Input.value); - - for (pos = 0; pos < this.tags.count; pos++) { - if (endPos >= this.tags[pos].start && endPos <= this.tags[pos].end) { - this.tagValue = this.tags[pos].tag; - this.saveTagPos = pos; - break; - } - } - - this.originalCaretPos = endPos; -} - - -AJAXDropDown.prototype.RequestSuggestions = function() { - var $me = this; - - if (this.useTags) { - if (this.tagValue == '') { - this.CloseBox(); - return; - } - - if (this.prevTagValue != this.tagValue) { - this.prevTagValue = this.tagValue; - - var $me = this; - var $url = this.SuggestURLCallback(this.tagValue); - - if ($url === false) { - // do nothing - return ; - } - - $.get( - $url, - function ($data) { - $me.successCallback($data, 'reload', $me); - }, - 'xml' - ); - } - } - else { - var $url = this.SuggestURLCallback(this.Input.value); - - if ($url === false) { - // do nothing - return ; - } - - $.get( - $url, - function ($data) { - $me.successCallback($data, 'reload', $me); - }, - 'xml' - ); - } -} - -AJAXDropDown.prototype.successCallback = function ($xml, params, object) { - object.OriginalValue = object.Input.value; - object.KeyUpWaiting = false; - object.ClearItems(); - - var items = $xml.getElementsByTagName('item'); - - if (items.length > 0) { - for (var i = 0; i < items.length; i++) { - object.AddItem(items[i].firstChild.nodeValue, items[i].attributes); - } - - object.OpenBox(); - } else { - object.CloseBox(); - } -} - -AJAXDropDown.prototype.errorCallback = function (request, params, object) { - this.KeyUpWaiting = false; -} - -AJAXDropDown.prototype.ClearItems = function() { - this.Box.scrollTop = 0; - this.UnselectItem(); - - for (var i = this.Box.childNodes.length - 1; i >= 0; i--) { - this.Box.removeChild(this.Box.childNodes[i]); - } -} - -AJAXDropDown.prototype.OpenBox = function() { - var $box = $(this.Box); - var $input = $(this.Input); - var $input_position = $(this.Input).offset(); - - $box.css('height', 'auto'); - - // try to place suggest-box below input - var $input_width = $input.outerWidth(); - var $input_height = $input.outerHeight(); - - if (this.maxWidth === false) { - $new_box_width = $input.width(); - - if (document.all) { - $new_box_width += ($input_width - $input.innerWidth()); // add borders for IE - } - } - else { - var $new_box_width = this.maxWidth; - } - - if ($box.width() < $new_box_width) { - // suggest-box width at lease same as input's width - $box.css('width', $new_box_width); - } - - var $box_left = $input_position.left; - var $box_top = $input_position.top + $input_height; - var $box_height = $box.outerHeight(); - - if ($box_top + $box_height > document.body.offsetHeight) { - // move above the box - $box_top -= ($input_height + $box_height); - } - - /*var $scroll_container = $($input).parents('#scroll_container_container'); - var $scroll_container_offset_top = $scroll_container.length > 0 ? $scroll_container.scrollTop() - $scroll_container.offset().top : 0; - - $box_top += $scroll_container_offset_top;*/ - - $(this.Box) - .css( - { - left: $box_left, - top: $box_top - } - ) - .show(); - - this.BoxOpen = true; -} - -AJAXDropDown.prototype.CloseBox = function() { - if (!this.BoxOpen) { - return; - } - - this.Box.style.display = 'none'; - this.BoxOpen = false; -} - -AJAXDropDown.prototype.AddItem = function(value, attributes) { - var item = addElement(this.Box, 'div'); - for (var i = 0; i < attributes.length; i++) { - item.setAttribute(attributes[i].nodeName, attributes[i].nodeValue); - } - - item.className = 'suggest-item'; - item.innerHTML = value; - var obj = this; - - $(item) - .mousemove( function() { obj.SelectItem(item) } ) - .mousedown( function() { obj.ClickItem(item) } ); -} - -AJAXDropDown.prototype.ClickItem = function(item) { - this.Input.value = this.GetValueCallback(item); - - if (this.useTags) { - this.setCaretPosition(this.newCaretPos); - } - - this.CloseBox(); -} - -AJAXDropDown.prototype.SelectNext = function() { - if (!this.SelectedItem) { - this.SelectItem(this.Box.firstChild, true); - return; - } - - if (isset(this.SelectedItem.nextSibling)) { - this.SelectItem(this.SelectedItem.nextSibling, true); - } - else { // down from last - this.UnselectItem(); - this.Input.value = this.OriginalValue; - - if (this.useTags) { - this.setCaretPosition(this.originalCaretPos); - } - } -} - -AJAXDropDown.prototype.SelectPrev = function() { - if (!this.SelectedItem) { - this.SelectItem(this.Box.lastChild, true); - return; - } - - if (isset(this.SelectedItem.previousSibling)) { - this.SelectItem(this.SelectedItem.previousSibling, true) - } - else { // up from first - this.UnselectItem(); - this.Input.value = this.OriginalValue; - - if (this.useTags) { - this.setCaretPosition(this.originalCaretPos); - } - } -} - -AJAXDropDown.prototype.UnselectItem = function(item) { - if (!item) { - item = this.SelectedItem; - } - - if (!item) { - return; - } - - item.className = 'suggest-item'; - this.SelectedItem = false; -} - -AJAXDropDown.prototype.SelectItem = function(item, setvalue) { - if (this.SelectedItem) { - this.UnselectItem(this.SelectedItem); - } - - item.className = 'suggest-item-over'; - this.SelectedItem = item; -// item.scrollIntoView(false); - - if (setvalue) { - this.Input.value = this.GetValueCallback(item); - - if (this.useTags) { - this.setCaretPosition(this.newCaretPos); - } - } -} - -AJAXDropDown.prototype.GetValue = function(item) { - if (!this.useTags) { - return item.innerHTML; - } - - var res = ''; - - for (pos = 0; pos < this.tags.count; pos++) { - res += this.tags[pos].separator; - - if (pos == this.saveTagPos) { - res += item.innerHTML; - this.prevTagValue = item.innerHTML; - this.newCaretPos = res.length; - } else { - res += this.tags[pos].tag; - } - } - - return res; -} Index: core/units/email_templates/email_template_eh.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/email_templates/email_template_eh.php (revision 15987) +++ core/units/email_templates/email_template_eh.php (revision ) @@ -32,7 +32,7 @@ 'OnSaveSelected' => Array ('self' => 'view'), 'OnExportEmailTemplates' => Array ('self' => 'view'), - 'OnSuggestAddress' => Array ('self' => 'add|edit'), + 'OnSuggestAddressJSON' => Array ('self' => 'add|edit'), // events only for developers 'OnPreCreate' => Array ('self' => 'debug'), @@ -433,12 +433,12 @@ * * @param kEvent $event */ - function OnSuggestAddress($event) + function OnSuggestAddressJSON($event) { $event->status = kEvent::erSTOP; $address_type = $this->Application->GetVar('type'); - $address = $this->Application->GetVar('value'); + $address = $this->Application->GetVar('term'); $limit = $this->Application->GetVar('limit'); if ( !$limit ) { @@ -478,15 +478,7 @@ $data = Array (); } - $this->Application->XMLHeader(); - - echo ''; - - foreach ($data as $item) { - echo '' . kUtil::escape($item, kUtil::ESCAPE_HTML) . ''; - } - - echo ''; + echo json_encode($data); } /** \ No newline at end of file Index: core/admin_templates/incs/grid_blocks.tpl IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/admin_templates/incs/grid_blocks.tpl (revision 15987) +++ core/admin_templates/incs/grid_blocks.tpl (revision ) @@ -349,11 +349,9 @@ value="" onkeypress="search_keydown(event, '', '', '')"/> \ No newline at end of file Index: core/admin_templates/config/config_edit.tpl IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/admin_templates/config/config_edit.tpl (revision 15987) +++ core/admin_templates/config/config_edit.tpl (revision ) @@ -80,19 +80,19 @@ \ No newline at end of file Index: core/admin_templates/incs/form_blocks.tpl IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/admin_templates/incs/form_blocks.tpl (revision 15987) +++ core/admin_templates/incs/form_blocks.tpl (revision ) @@ -732,22 +732,19 @@