When load a file is uploaded using a dialog box and the jquery plugin ajaxForm, the ajaxForm plugin uses an hidden iFrame element to send the multi-part
form and this is where the response goes. The ajaxForm plugin then retrieves the document body and parses the result as a json string. If the file uploads
properly everything is fine, but if it fails Gallery3 return the input form with the the error fields highlighted as part of the json response. As this
response is returned to a hidden iframe, the browser attempts to manipulate it and all hell breaks loose. We lose the trailing brace, we start getting
escaping of form tags. When the ajaxForm plugin retrieves the iFrame body its no longer a valid json frame and the parsing fails and the user sees no
indication that it failed.
and have some basic namespacing:
showMessage --> gallery_show_message
vAlign --> gallery_valign
showLoading --> gallery_show_loading
Convert gallery.show_full_size.js to be a jQuery function and give it a namespace:
show_full_size --> gallery_show_full_size
javascript lib (gallery.reload.js) which defines the functions
gallery_reload() and gallery_location(new_location). They just
do a window.location.reload() and window.location = new_location.
This change breaks the assumption that all themes will handle page reloads
the same and allows the theme to customize the page refresh.
action. The expectation is that we're going to reload the page (or
redirect to a new url). If we close the dialog, then we can trigger
the onhover for items we've just deleted causing errors.
Simplify the API while we're at it by getting rid of the no-longer-used
on_success argument to openDialog()
This fixes#528.
allows the form in the dialog todo custom processing when the form
closes.
For example, the server_add dialog (next commit) uses this callback to
determine if the upload task was cancelled and display a warning
message when the page reloads.
Usage:
$("#gServerAdd form").bind("form_closing", function(target){...});
1) Shuffled code around to create a on_form_loaded function
2) Check for a data.reset string in the json return. If it exists and
is a function then call. The idea being that if there is an error we
might have to reset some jquery widget initialization.
UI Core
Effects Core
Draggable - Req'd by Sortable
Resizeable - Image/watermark/avatar scaling
Sortable - Rearrange
Dialog - All over :)
Datepicker - Edit albums/items
Progressbar
Highlight - Message display, comment addition
Transfer - Adding tags from available list to field
Not fully integrated into the default theme yet.
1) Get rid of the resizing behavior; create the dialog in the right
place and then show it.
2) Grab the fieldset legend and put it into the title of the dialog,
so that we don't have to use title="" params in anchors.
3) Stop using fixed buttons and let the form define its own buttons.
4) Stop suppressing all form buttons.