Page MenuHomeIn-Portal Phabricator

D58.id.diff
No OneTemporary

File Metadata

Created
Fri, Jun 13, 5:23 PM

D58.id.diff

Index: branches/5.2.x/core/admin_templates/js/toolbar.js
===================================================================
--- branches/5.2.x/core/admin_templates/js/toolbar.js
+++ branches/5.2.x/core/admin_templates/js/toolbar.js
@@ -264,19 +264,30 @@
/* ----------- */
-function ToolBarMarkup(title, html) //extends ToolBarButton
+function ToolBarMarkup(title, html, $hidden) //extends ToolBarButton
{
this.Title = title;
+ this.Hidden = $hidden ? true : false;
this.HTML = html;
}
ToolBarMarkup.prototype = new ToolBarButton;
ToolBarMarkup.prototype.GetHTML = function() {
- return this.HTML;
+ var add_style = this.ToolBar.ButtonStyle ? 'style="' + this.ToolBar.ButtonStyle + '"' : '';
+ var padding = this.ToolBar.UseLabels ? '12px' : '2px';
+
+ return '<div id="' + this.GetToolID('div') + '" class="toolbar-button" style="padding-top: ' + padding + '; height: 32px;" ' + add_style + '>' + this.HTML + '</div>';
+}
+
+ToolBarMarkup.prototype.Init = function() {
+ this.Container = document.getElementById(this.GetToolID('div')) ? document.getElementById(this.GetToolID('div')) : false;
+
+ if (this.Hidden) {
+ this.Hide();
+ }
}
-ToolBarMarkup.prototype.Init = function() { }
ToolBarMarkup.prototype.Enable = function() { }
ToolBarMarkup.prototype.Disable = function() { }

Event Timeline