Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2011-03-21 23:13:35

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: msd_minibar: Adds a Microsoft Office style "minibar" to the Write tab

I see. Just for trying, I added this:

            $("#body").keydown(function() {
                $("#msd_menu").fadeOut("1000");
            });

After the similar function triggered by mousedown, and it seems to work. Now I can press on arrows keys (or simply type some text) if I want the minibar to disappear, fair enough. I haven’t intensively tested it, maybe you may consider evaluating too. If I find problems I’ll report back here.

Offline

#12 2011-10-25 07:54:40

SuMu
Member
From: Germany - Wuppertal
Registered: 2008-03-06
Posts: 242
Website

Re: msd_minibar: Adds a Microsoft Office style "minibar" to the Write tab

Unfortunately you can not download it ….


viele Grüße
SuMu

Psychomuell + blogZicke

Offline

#13 2011-10-25 17:14:28

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,251
Website

Re: msd_minibar: Adds a Microsoft Office style "minibar" to the Write tab

Oh shoot. Looks like I’ve lost the source at some point when I restored my site from a backup. Sorry. If someone has it send it to me and I can restore the download link.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#14 2011-10-25 18:16:32

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,251
Website

Re: msd_minibar: Adds a Microsoft Office style "minibar" to the Write tab

Version 0.5 has been restored thanks to Uli. Sorry, I don’t remember what changed in version 0.6 which i apparently had at somepoint.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#15 2012-08-09 15:30:33

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: msd_minibar: Adds a Microsoft Office style "minibar" to the Write tab

Thanks for this one, Matt.

Here is a little change that makes it more usable when the textarea is very large (for example, when using rah_expanding, which auto-grows textareas).

...
echo "$('#msd_".$msd_menu_items[$row]["tag"]."').click(function(e) {"."\n";
echo '  e.preventDefault();'."\n";
...

This helps by avoiding the browser scroll jumping back to top.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#16 2012-08-09 15:51:34

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: msd_minibar: Adds a Microsoft Office style "minibar" to the Write tab

Reporting an issue between msd_minibar and latest Txp 4.5 Beta (from SVN): forum.textpattern.com/viewtopic.php?pid=264308#p264308


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#17 2012-08-09 16:36:38

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,251
Website

Re: msd_minibar: Adds a Microsoft Office style "minibar" to the Write tab

Maniqui, I wasn’t able to recreate this behavior. Do you have any custom buttons you’ve added?

Steps I took to try and reproduce:

  • Highlighted text in existing article and used one of the mini_bar buttons to modify it.
  • Clicked Save
  • Saw “Article Saved” message
  • Created new article
  • Highlighted text in new article and used one of the mini_bar buttons to modify it.
  • Clicked Publish
  • Saw “Article Published” message

I tried this using both the Classic theme and Hive on 4.5.0-beta (r4033). I only tested using IE8 (because I’m at work shhhhh).

Last edited by MattD (2012-08-09 16:38:05)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#18 2012-08-09 16:53:07

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: msd_minibar: Adds a Microsoft Office style "minibar" to the Write tab

Hi Matt. Thanks for the prompt reply & for taking the time of doing a test.

I’ve more info about this issue (which I’m not sure it will get covered by the warranty ;) ): I’m using the plugin from the plugin cache dir. I’ve just tried installing it directly on the DB (as any good Txp citizen would do) and it worked flawlessly. :D
Now, I wonder if there is any solution for us, badasses who run plugins from plugin cache dir ;)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#19 2012-08-09 17:00:16

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,251
Website

Re: msd_minibar: Adds a Microsoft Office style "minibar" to the Write tab

No idea on why that would cause any difference. There aren’t any lifecycle events that take place on install for this plugin or anything complicated going on.

Maybe diff the html source of the write page with the plugin loaded each way and see if something is different?
Also compare the output of http://yoursite.com/textpattern/?msd_minibar_js=jquery.caret.js
and http://yoursite.com/textpattern/?msd_minibar_js=msd_minibar.css with the plugin loaded each way.

I can do this later this evening if needed.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#20 2012-08-10 01:59:56

Gocom
Plugin Author
Registered: 2006-07-14
Posts: 4,524
Website

Re: msd_minibar: Adds a Microsoft Office style "minibar" to the Write tab

maniqui wrote:

Now, I wonder if there is any solution for us, badasses who run plugins from plugin cache dir

Plugin’s in the cache directory are loaded globally, and as such, will cause issues. For instance these plugins that add markup to the admin-pages interface, will be active on the async ajax responses too. These response pages have same callback events available and a plugin that inject markup to the admin-side interface, will inject it’s markup to the response script too, making it invalid and causing the issue you are describing.

MattD wrote:

No idea on why that would cause any difference. There aren’t any lifecycle events that take place on install for this plugin or anything complicated going on.

Difference is where the plugin is loaded when the plugin cache directory is used. There is nothing wrong with your plugin, and I would say you do not really have to do any changes to it. The code itself is very much fine. Anyways, the line that is causing the mentioned issue is:

register_callback("msd_minibar", "article");

The above line will add msd_minibar function’s output to the script response when plugin is loaded using the wrong type (i.e. using plugin cache directory). To remedy the issue, you could change that callback event to a one that isn’t ran on the ajax script responses. For instance the admin_side.head_end is safe to use. E.g.

register_callback("msd_minibar", "admin_side", "head_end");

You can then prevent the script from running on all admin-side panels by adding something like this to the top of the msd_minibar function:

global $event;
if($event !== 'article') {
	return;
}

Last edited by Gocom (2012-08-10 02:10:53)

Offline

Board footer

Powered by FluxBB