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 = '