Index: trunk/kernel/admin_templates/incs/toolbar.js =================================================================== diff -u -N -r5009 -r5044 --- trunk/kernel/admin_templates/incs/toolbar.js (.../toolbar.js) (revision 5009) +++ trunk/kernel/admin_templates/incs/toolbar.js (.../toolbar.js) (revision 5044) @@ -35,13 +35,22 @@ if (!img_path) { alert('error: toolbar image path not set'); } +// alert('base toolbar button: ['+img_path + this.Module + 'toolbar/'+'];'); return img_path + this.Module + 'toolbar/'; } ToolBarButton.prototype.GetHTML = function() { return ''; } +ToolBarButton.prototype.GetObject = function() { + var $img = document.createElement('IMG'); + $img.id = 'tool_' + this.Title; + $img.src = this.IconsPath() + this.ToolBar.IconPrefix + this.Title + '.gif'; + $img.title = this.Alt; + return $img; +} + ToolBarButton.prototype.Init = function() { img = document.getElementById('tool_' + this.Title); this.imgObject = img; @@ -139,6 +148,14 @@ return ''; } +ToolBarSeparator.prototype.GetObject = function() { + var $img = document.createElement('IMG'); + $img.id = 'tool_' + this.Title; + $img.src = this.IconsPath() + 'tool_divider.gif'; + $img.title = ''; + return $img; +} + ToolBarSeparator.prototype.Init = function() { img = document.getElementById(this.ToolBar.IconPrefix + this.Title); this.imgObject = img; @@ -167,13 +184,22 @@ this.Buttons[a_button.Title] = a_button; } -ToolBar.prototype.Render = function() +ToolBar.prototype.Render = function($container) { - for (var i in this.Buttons) { - btn = this.Buttons[i]; - document.write( btn.GetHTML() ); - btn.Init(); + if ($container) { + for (var i in this.Buttons) { + btn = this.Buttons[i]; + $container.appendChild( btn.GetObject() ); + btn.Init(); + } } + else { + for (var i in this.Buttons) { + btn = this.Buttons[i]; + document.write( btn.GetHTML() ); + btn.Init(); + } + } } ToolBar.prototype.EnableButton = function(button_id) { Index: trunk/kernel/admin_templates/incs/script.js =================================================================== diff -u -N -r5042 -r5044 --- trunk/kernel/admin_templates/incs/script.js (.../script.js) (revision 5042) +++ trunk/kernel/admin_templates/incs/script.js (.../script.js) (revision 5044) @@ -471,16 +471,16 @@ return $kf.elements[$field] ? $kf.elements[$field].value : false; } -function search($prefix_special, $grid_name) +function search($prefix_special, $grid_name, $ajax) { set_hidden_field('grid_name', $grid_name); - submit_event($prefix_special,'OnSearch'); + submit_event($prefix_special, 'OnSearch', null, null, $ajax); } -function search_reset($prefix_special, $grid_name) +function search_reset($prefix_special, $grid_name, $ajax) { set_hidden_field('grid_name', $grid_name); - submit_event($prefix_special,'OnSearchReset'); + submit_event($prefix_special, 'OnSearchReset', null, null, $ajax); } function search_keydown($event) Index: trunk/kernel/admin_templates/incs/header.tpl =================================================================== diff -u -N -r5026 -r5044 --- trunk/kernel/admin_templates/incs/header.tpl (.../header.tpl) (revision 5026) +++ trunk/kernel/admin_templates/incs/header.tpl (.../header.tpl) (revision 5044) @@ -30,7 +30,7 @@ var tpl_changed = 0; var base_url = ''; var $base_path = ''; -var img_path = "img/"; +var img_path = '/img/'; Index: trunk/kernel/admin_templates/incs/grid_blocks.tpl =================================================================== diff -u -N -r5042 -r5044 --- trunk/kernel/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 5042) +++ trunk/kernel/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 5044) @@ -58,20 +58,24 @@ Grid="" style="border: 1px solid grey;"> - + ]"> + + document.getElementById('_search_keyword').onkeydown = search_keydown; + Toolbars['_search'] = new ToolBar('icon16_'); + Toolbars['_search'].AddButton( new ToolBarButton('search', '', function() { search('','', ) } ) ); + Toolbars['_search'].AddButton( new ToolBarButton('search_reset', '', function() { search_reset('','', ) } ) ); + Toolbars['_search'].Render(document.getElementById('search_buttons[]')); + + ','', );" class="columntitle_small">.gif" border="0" align="absmiddle"> Index: trunk/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r4997 -r5044 --- trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 4997) +++ trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 5044) @@ -26,16 +26,26 @@ } /** + * Base folder for all template includes + * + * @param Array $params + * @return string + */ + function TemplatesBase($params) + { + return $this->Application->BaseURL().substr(THEMES_PATH, 1); + } + + /** * Creates HTML tag for all templates * affects future css, js files and href params of links * * @return string * @access public */ - function Base_Ref() + function Base_Ref($params) { - $url = $this->Application->BaseURL().substr(THEMES_PATH, 1).'/'; - return ''; + return ''; } /** @@ -49,11 +59,6 @@ return $this->Application->BaseURL(); } - function TemplatesBase($params) - { - return $this->Application->BaseURL().THEMES_PATH; - } - function ProjectBase($params) { return $this->Application->BaseURL();