jQuery UI Dialog
PermalinkThat said, jQuery UI dialog does a bit more than concrete5, and does it nicer. Our dialog class was only ever going to be modal, with only one dialog ever active. jQuery UI's dialog doesn't suffer from that limitation. Additionally, windows are resizable, more easily themeable, etc...
To that end, I have attempted to rewrite our ccm.dialog.js class so that it is essentially a wrapper class for jQuery UI dialog. If you call it the way you always use to call concrete5 dialogs, it will translate those calls into jQuery UI dialog calls, and call the jQuery UI dialog box. If you call it using arguments (which we never really did), or on a DIV element, then we will pass through the call directly to our jQuery UI dialog namespace (which we have named jqdialog()).
I'd like anyone interested in this to test it out. A caveat: 1) the theme that we're using for these dialogs isn't final. It's a just a random jQuery UI theme I thought was nice and decided to apply, to see just how themeable this dialog box would be.
# Installation
1. Download the attached zip. Unzip it.
2. Take all the css files in the archive and place them in the root of a concrete5 site. (Note: this has only been tested with the latest and greatest github source.)
3. Take all the JavaScript files in the archive and place them in the root of a concrete5 site.
Test away! I'm interested in any places in the concrete5 editing experience where this isn't working, any places in any existing add-ons that aren't working, and any existing jQuery UI tutorials on the web, with sample code, that aren't working. Some cursory jQuery UI demos from jqueryui.com all seem to work, and I believe all concrete5 code should be working in this dialog as well.
UPDATE: I've removed the attachment from this, since it's updated further down in the thread. Check out version 1.2.
Additionally, I noticed some of the bugs you were talking about. Try this updated .zip file. I don't think I changed much, but I realized there was some code in the dialog class that really didn't need to be there.
Thanks for testing this out.
NOTE: I've removed the attachment from this post, as there's a newer one further down in the thread.
-Steve
As a note, I could click the + symbol and move up/down, then I was able to click to add blocks, but not on the first go around.
So far, only small pop-ups (like the block edits) seem to use it. Can it be extended to the other dialogs from the main menu bar ?(like the page designer and page properties).
1.2
- Fixes the slider/layout issue talked about elsewhere in this thread
- Works with the discussion add-on.
1. For any dialog that uses the color picker (for example when you use the "Design" dialog to add a border or background to a block), the color picker loads behind the dialog and can't be used.
2. When using any block that accesses the file manager (for example the Content Block when trying to Add Image), the popup menu to choose/view/edit/etc a file, is missing.
Tested on Chrome and Firefox
I see what you mean about the color picker. I've checked in a change to ccm.colorpicker.css which ups the color picker z-index. It can be downloaded from github.
I wasn't seeing #2, but I think that's because I did a similar change already for the menu z-index, which is checked into github.
Kind regards
Dan
I haven't run into any other problems so far.
I just read some discussions about the problems using jquery ui dialog. I try to understand (and to apply) the solution you described here but i don't success.
Can you develop ? just add some code for example.
In my case, i just want to use the dialog-confirm from jquery ui. So, i add in $(document).ready(function():
$( "#dialog-confirm" ).dialog({ resizable: false, height:140, modal: true, buttons: { "Delete": function() { $( this ).dialog( "close" ); }, Cancel: function() { $( this ).dialog( "close" ); } } });
In the html, i put :
<div id="dialog-confirm" title="Do something ?"> <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>It's not working !!</p> </div>
The error is that there is no method .dialog for my object (the DIV i think). In 5.4.2, i thought that if I apply a .dialog on a DIV, i will be automatically redirect to the jquery ui function.
An idea ?
thanks
and for when is forecasted the release of 5.5 (in order to know if i wait or if i implement by another way) ?
Also, I see scroll bars in most of the windows. Not sure if this is different from Mac to PC (I'm on a Windows 7 machine), but thought I'd mention it. Check out the screen shots.
Overall though, it feels robust and "snappier" than what's currently in 5.4.1.1. I also like the theme better (feel like C5's current modal gloss looks very web 2.0, circa 2005). But that is a whole different topic. Tested on a site with sample content, default theme, C5 5.4.1.1.