forward porting assetmanager crumb trail more menu

This commit is contained in:
Colin Kuskie 2008-11-25 23:40:28 +00:00
parent c066b2bf18
commit 3cf6d283da
3 changed files with 68 additions and 19 deletions

View file

@ -6,6 +6,8 @@
- fixed: #9149: Account: default templates do not work right
- fixed: Adding a file extension for URLs in the system settings now properly affects newly created Assets. It still does not update existing asset URL's.
- fixed #9152: Pagination broken in Contribs Section of new Account System
- fixed #4159: more menu doesn't appear for current asset on crumb trail
- fixed: Adding a file extension for URLs in the system settings now properly affects newly created Assets. It still does not update existing asset URL's.
7.6.4
- Survey now will show progress and time limit.
@ -71,6 +73,25 @@
- fixed #4213: Can see "edit" tab even tho i am not logged in
- fixed #9139: Updating a workflow property causes workflow to be disabled
- fixed #9140: Date format error when adding tasks to PM
- fixed #8800: Errors in POD of Asset-related mix-in modules (Bernd Kalbfuß-Zimmermann)
- fixed #9143: Yes No user profile fields problem when default == 1
7.5.34
- fixed: Regression with ProfileField->formField. Added tests to prevent future regression
- fixed #8849: More missing i18n
- fixed: Performance issue with Stow. Added a way to bypass safety for speed.
- fixed #4182: Edit links show in asset manager for locked assets
- fixed #8971: UserList shows accounts that have been self-deactivated (Bernd Kalbfuß-Zimmermann)
- fixed #4199: Default values of user profile fields are not filled in correctly when shown by the UserList asset (Bernd Kalbfuß-Zimmerman)
- fixed #9068: field.inTab
- fixed #8845: Workflows refusing to show edit screen
- fixed #4198: Namespace of Template "Newsletter (Manager)" set to "Collaboration
- fixed #9106: Calendar Feed Workflow Creating Version Tags w/o Updates
- fixed #8914: epoch for calendar/List View for Calendar
- fixed #8822: Password Recovery Tempalte not working
- fixed: DataForm times out when exporting large data sets
- fixed: DataForm entry data field is too small
>>>>>>> .merge-right.r8665
7.6.3

View file

@ -428,7 +428,7 @@ ENDHTML
}
# And ourself
$output .= sprintf q{<li><a href="#" onclick="WebGUI.AssetManager.showMoreMenu('%s'); return false;">%s</a></li>},
$output .= sprintf q{<li><a href="#" onclick="WebGUI.AssetManager.showMoreMenu('%s','crumbMoreMenuLink'); return false;"><span id="crumbMoreMenuLink">%s</span></a></li>},
$currentAsset->getUrl,
$currentAsset->get( "menuTitle" ),
;

View file

@ -41,6 +41,33 @@ WebGUI.AssetManager.addHighlightToRow
}
};
/*---------------------------------------------------------------------------
WebGUI.AssetManager.buildMoreMenu ( url, linkElement )
Build a WebGUI style "More" menu for the asset referred to by url
*/
WebGUI.AssetManager.buildMoreMenu
= function ( url, linkElement ) {
// Build a more menu
var rawItems = WebGUI.AssetManager.MoreMenuItems;
var menuItems = [];
for ( var i = 0; i < rawItems.length; i++ ) {
var itemUrl = rawItems[i].url.match( /<url>/ )
? rawItems[i].url.replace( /<url>(?:\?(.*))?/, WebGUI.AssetManager.appendToUrl(url, "$1") )
: url + rawItems[i].url
;
menuItems.push( { "url" : itemUrl, "text" : rawItems[i].label } );
}
var options = {
"zindex" : 1000,
"clicktohide" : true,
"position" : "dynamic",
"context" : [ linkElement, "tl", "bl" ],
"itemdata" : menuItems
};
return options;
};
/*---------------------------------------------------------------------------
WebGUI.AssetManager.findRow ( child )
Find the row that contains this child element.
@ -82,24 +109,7 @@ WebGUI.AssetManager.formatActions = function ( elCell, oRecord, oColumn, orderNu
oldMenu.parentNode.removeChild( oldMenu );
}
// Build a more menu
var rawItems = WebGUI.AssetManager.MoreMenuItems;
var menuItems = [];
for ( var i = 0; i < rawItems.length; i++ ) {
var itemUrl = rawItems[i].url.match( /<url>/ )
? rawItems[i].url.replace( /<url>(?:\?(.*))?/, WebGUI.AssetManager.appendToUrl(oRecord.getData( 'url' ), "$1") )
: oRecord.getData( 'url' ) + rawItems[i].url
;
menuItems.push( { "url" : itemUrl, "text" : rawItems[i].label } );
}
var options = {
"zindex" : 1000,
"clicktohide" : true,
"position" : "dynamic",
"context" : [ more, "tl", "bl" ],
"itemdata" : menuItems
};
var options = WebGUI.AssetManager.buildMoreMenu(oRecord.getData( 'url' ), more);
var menu = new YAHOO.widget.Menu( "moreMenu" + oRecord.getData( 'assetId' ), options );
YAHOO.util.Event.onDOMReady( function () { menu.render( document.getElementById( 'assetManager' ) ) } );
@ -329,6 +339,24 @@ WebGUI.AssetManager.selectRow = function ( child ) {
}
};
/*---------------------------------------------------------------------------
WebGUI.AssetManager.showMoreMenu ( url, linkTextId )
Build a More menu for the last element of the Crumb trail
*/
WebGUI.AssetManager.showMoreMenu
= function ( url, linkTextId ) {
var more = document.getElementById(linkTextId);
var options = WebGUI.AssetManager.buildMoreMenu(url, more);
var menu = new YAHOO.widget.Menu( "crumbMoreMenu", options );
menu.render( document.getElementById( 'assetManager' ) );
menu.show();
menu.focus();
//YAHOO.util.Event.onDOMReady( function () { menu.render( document.getElementById( 'assetManager' ) ) } );
//YAHOO.util.Event.addListener( more, "click", function (e) { menu.show(); menu.focus(); YAHOO.util.Event.stopEvent(e); }, null, menu );
};
/*---------------------------------------------------------------------------
WebGUI.AssetManager.toggleHighlightForRow ( checkbox )
Toggle the highlight for the row based on the state of the checkbox