Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2006-05-23 07:29:03

bilbo_b
Xinha Community Member
Registered: 2005-12-02
Posts: 13
Website

Button to enable/disable Stylist ?

Is there a button where i can enable / disable the Stylist pane ? Xinha should be loaded with Stylist enabled all the time but the button should made the Stylist Pane visible or invisible. Is such a thing possible without to reload the whole page ? I think it should like the sidepane in Mozilla Browsers when you know what i mean.


[url=http://www.pfohlnet.de]pfohl://NET[/url]

Offline

#2 2006-05-24 03:51:24

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Button to enable/disable Stylist ?

Such a button would be easy enough to make,

xinha_config.registerButton({ id: 'hide_panels', tootip: 'Hide Panel', image : 'someimage.gif', textMode: true, action: function(editor) { edit.hidePanels() }});

or something close to that should do the trick.


James Sleeman

Offline

#3 2006-05-28 08:11:25

bilbo_b
Xinha Community Member
Registered: 2005-12-02
Posts: 13
Website

Re: Button to enable/disable Stylist ?

Hmm this will not work completely, i get JavaScript Error with FireFox 1.5.03:

Warnung: Element referenziert durch ID/NAME im globalen Geltungsbereich. Verwenden Sie stattdessen den W3C-Standard document.getElementById().
Quelldatei: http://localhost/reiterhof/service/text.php?page_id=9&
Zeile: 77

and:

Fehler: artikel_text.hidePanels is not a function
Quelldatei: http://localhost/reiterhof/service/text.php?page_id=9&
Zeile: 77

Is there a ID/NAME for the Stylist Panel ? artikel_text is my ID for the textarea...

Last edited by bilbo_b (2006-05-28 08:12:24)


[url=http://www.pfohlnet.de]pfohl://NET[/url]

Offline

#4 2006-05-30 06:07:56

bilbo_b
Xinha Community Member
Registered: 2005-12-02
Posts: 13
Website

Re: Button to enable/disable Stylist ?

My Code inside the html Page looks like this:

xinha_config = xinha_config ? xinha_config() : new HTMLArea.Config();

xinha_config.registerButton("hide_panels","Hide Panel","someimage.gif",true,function(editor) { edit.hidePanels("right") });

xinha_config.toolbar = [  ["hide_panels"]  ];

I hope this is ok ? When i click now on the button in Internet Explorer nothing is happen, no error message, no function...

When im right, this above is a function to hide the Panels on the right side... I think there is a function showPanels(right) , when i use this, a panel is showing up.

My Question now is: When xinha is initaly displayed the panel should be not showning, it should be disabled, only when i click on a button it should be visible (maybe via function showPanels()...) when i click another time on this button, the panel should be disabled via the hidePanels() function...


[url=http://www.pfohlnet.de]pfohl://NET[/url]

Offline

#5 2006-05-30 06:39:56

bilbo_b
Xinha Community Member
Registered: 2005-12-02
Posts: 13
Website

Re: Button to enable/disable Stylist ?

i have found a soulution:

xinha_config.registerButton("hide_show","Stylist Anzeigen/Verstecken","someimage.gif",false,
   function(editor) 
   { 
   Stylist._isActive = false;

   if ( this._isActive )
   {
      this._isActive = false;
      editor.hidePanel( editor._stylist );
    }
    else
    {
      this._isActive = true;
      editor.showPanel( editor._stylist );
    }
   });

This will toggle the visibility of the stylist pane with every click on the button... but the stylist is stil visible for the first load of xinha... i can go directly to the plugin and change that in the stylist code, but thats not very comfortable. is there a way to disable stylist via hodePanel() from the calling html page ?


[url=http://www.pfohlnet.de]pfohl://NET[/url]

Offline

Board footer

Powered by FluxBB