
theory at bricolage
Mar 11, 2009, 11:15 AM
Post #1 of 1
(486 views)
Permalink
|
|
[8486] I thought I committed this last night.
|
|
Revision: 8486 Author: theory Date: 2009-03-11 11:15:54 -0700 (Wed, 11 Mar 2009) ViewCVS: http://viewsvn.bricolage.cc/?rev=8486&view=rev Log Message: ----------- I thought I committed this last night. Let story and media association and disociation be async, so Camino closes the popup window. Modified Paths: -------------- bricolage/trunk/comp/media/js/lib.js bricolage/trunk/comp/widgets/container_prof/edit_related_story.html Modified: bricolage/trunk/comp/media/js/lib.js =================================================================== --- bricolage/trunk/comp/media/js/lib.js 2009-03-11 09:38:20 UTC (rev 8485) +++ bricolage/trunk/comp/media/js/lib.js 2009-03-11 18:15:54 UTC (rev 8486) @@ -1483,7 +1483,7 @@ // returns the updated partial, which is then inserted into the parent // window. Takes the container ID to which to add the asset and the ID of // the asset to relate - update_related: function(action, type, widget, container_id, asset_id) { + update_related: function(action, type, widget, container_id, asset_id, sync) { new Ajax.Updater( { success: window.opener.document.getElementById( 'element_' + container_id + '_rel_' + type @@ -1492,7 +1492,7 @@ parameters: 'type=' + type + '&widget=' + widget + '&container_id=' + container_id + '&container_prof|' + action + '_' + type + '_cb=' + asset_id, - asynchronous: true, + asynchronous: !sync, onSuccess: function(r) { window.close(); }, onFailure: Bricolage.handleError, on403: Bricolage.handleForbidden, @@ -1501,12 +1501,12 @@ ) }, - relate: function(type, widget, container_id, asset_id) { - return Container.update_related('relate', type, widget, container_id, asset_id); + relate: function(type, widget, container_id, asset_id, sync) { + return Container.update_related('relate', type, widget, container_id, asset_id, sync); }, - unrelate: function(type, widget, container_id, asset_id) { - return Container.update_related('unrelate', type, widget, container_id, asset_id); + unrelate: function(type, widget, container_id, asset_id, sync) { + return Container.update_related('unrelate', type, widget, container_id, asset_id, sync); }, // Update the display of an element, but do nothing else. If sync is true, Modified: bricolage/trunk/comp/widgets/container_prof/edit_related_story.html =================================================================== --- bricolage/trunk/comp/widgets/container_prof/edit_related_story.html 2009-03-11 09:38:20 UTC (rev 8485) +++ bricolage/trunk/comp/widgets/container_prof/edit_related_story.html 2009-03-11 18:15:54 UTC (rev 8486) @@ -60,10 +60,10 @@ $o->get_title . '</a>'; } elsif ($field eq 'action') { if ($relate_id == $o->get_id) { - return qq{<a href="#" class="redLink" onclick="Container.unrelate('story', '$widget', } . $element->get_id . ', ' . $o->get_id . qq{); return false">Un-relate</a>}; + return qq{<a href="#" class="redLink" onclick="Container.unrelate('story', '$widget', } . $element->get_id . ', ' . $o->get_id . qq{, true); return false">Un-relate</a>}; } else { - return qq{<a href="#" class="redLink" onclick="Container.relate('story', '$widget', } . $element->get_id . ', ' . $o->get_id . qq{); return false">Relate</a>}; + return qq{<a href="#" class="redLink" onclick="Container.relate('story', '$widget', } . $element->get_id . ', ' . $o->get_id . qq{, true); return false">Relate</a>}; } } }; -</%init> \ No newline at end of file +</%init>
|