Index: branches/RC/themes/default2009/platform/template_manager/inc/template_manager.js =================================================================== diff -u -r11484 -r11610 --- branches/RC/themes/default2009/platform/template_manager/inc/template_manager.js (.../template_manager.js) (revision 11484) +++ branches/RC/themes/default2009/platform/template_manager/inc/template_manager.js (.../template_manager.js) (revision 11610) @@ -61,24 +61,21 @@ TemplateManager.prototype.onMouseOver = function ($e, $element) { - if (!$element.className.match(/[ ]{0,1}block-container-over[ ]{0,1}/)) { - $element.className += ' block-container-over'; - } - + $($element).addClass('block-edit-btn-container-over'); $e.stopPropagation(); } TemplateManager.prototype.onMouseOut = function ($e, $element) { - $element.className = $element.className.replace(/[ ]{0,1}block-container-over[ ]{0,1}/, ''); - + $($element).removeClass('block-edit-btn-container-over'); $e.stopPropagation(); } TemplateManager.prototype.searchBlocks = function () { $('div').each ( function () { - var $id = this.getAttribute('id'); - if (!$id || !$id.match(/parser_block\[.*\]/)) { + var $id = $(this).attr('id'); + + if (!$id || $id.match(/parser_block\[.*\].*_btn$/) || !$id.match(/parser_block\[.*\]/)) { // skip other divs return true; } @@ -139,36 +136,4 @@ window[$id] = new CodePress($textarea); $( window[$id] ).insertBefore($textarea); -} - -function getFrame($name) -{ - var $main_window = window; - - // 1. cycle through popups to get main window - try { - // will be error, when other site is opened in parent window - var $i = 0; - while ($main_window.opener) { - if ($i == 10) { - break; - } - - $main_window = $main_window.opener; - $i++; - } - } - catch (err) { - // catch Access/Permission Denied error -// alert('getFrame.Error: [' + err.description + ']'); - return window; - } - - var $frameset = $main_window.parent.frames; - for ($i = 0; $i < $frameset.length; $i++) { - if ($frameset[$i].name == $name) { - return $frameset[$i]; - } - } - return $main_window.parent; } \ No newline at end of file