Fix the More menus in the AssetManager. Fixes bug #11069.
Also, some jslint cleanup of the code.
This commit is contained in:
parent
c1ce7470b9
commit
74e4e25bc0
2 changed files with 11 additions and 12 deletions
|
|
@ -19,6 +19,7 @@
|
|||
- fixed #11165: DatePicker broken in IE7
|
||||
- added: Manage System Clipboard group setting
|
||||
- added: Manage System Trash group setting
|
||||
- fixed #11069: "More" options menu in asset manager
|
||||
|
||||
7.8.2
|
||||
- Added scheduled vendor payout workflow activity. (Special thanks to Martin @ Oqapi)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ if ( typeof WebGUI.AssetManager == "undefined" ) {
|
|||
|
||||
// Keep track of the open more menus
|
||||
WebGUI.AssetManager.MoreMenusDisplayed = {};
|
||||
WebGUI.AssetManager.CrumbMoreMenu;
|
||||
WebGUI.AssetManager.CrumbMoreMenu = undefined;
|
||||
// Append something to a url:
|
||||
WebGUI.AssetManager.appendToUrl = function ( url, params ) {
|
||||
var components = [ url ];
|
||||
|
|
@ -25,15 +25,14 @@ WebGUI.AssetManager.appendToUrl = function ( url, params ) {
|
|||
}
|
||||
components.push(params);
|
||||
return components.join('');
|
||||
}
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
WebGUI.AssetManager.addHighlightToRow ( child )
|
||||
Highlight the row containing this element by adding to it the "highlight"
|
||||
class
|
||||
*/
|
||||
WebGUI.AssetManager.addHighlightToRow
|
||||
= function ( child ) {
|
||||
WebGUI.AssetManager.addHighlightToRow = function ( child ) {
|
||||
var row = WebGUI.AssetManager.findRow( child );
|
||||
if ( !YAHOO.util.Dom.hasClass( row, "highlight" ) ) {
|
||||
YAHOO.util.Dom.addClass( row, "highlight" );
|
||||
|
|
@ -44,8 +43,7 @@ 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, isNotLocked ) {
|
||||
WebGUI.AssetManager.buildMoreMenu = function ( url, linkElement, isNotLocked ) {
|
||||
// Build a more menu
|
||||
var rawItems = WebGUI.AssetManager.MoreMenuItems;
|
||||
var menuItems = [];
|
||||
|
|
@ -63,7 +61,7 @@ WebGUI.AssetManager.buildMoreMenu
|
|||
"zindex" : 1000,
|
||||
"clicktohide" : true,
|
||||
"position" : "dynamic",
|
||||
"context" : [ linkElement, "tl", "bl" ],
|
||||
"context" : [ linkElement, "tl", "bl", ["beforeShow", "windowResize"] ],
|
||||
"itemdata" : menuItems
|
||||
};
|
||||
|
||||
|
|
@ -74,8 +72,7 @@ WebGUI.AssetManager.buildMoreMenu
|
|||
WebGUI.AssetManager.findRow ( child )
|
||||
Find the row that contains this child element.
|
||||
*/
|
||||
WebGUI.AssetManager.findRow
|
||||
= function ( child ) {
|
||||
WebGUI.AssetManager.findRow = function ( child ) {
|
||||
var node = child;
|
||||
while ( node ) {
|
||||
if ( node.tagName == "TR" ) {
|
||||
|
|
@ -114,7 +111,7 @@ WebGUI.AssetManager.formatActions = function ( elCell, oRecord, oColumn, orderNu
|
|||
var options = WebGUI.AssetManager.buildMoreMenu(oRecord.getData( 'url' ), more, oRecord.getData( 'actions' ));
|
||||
|
||||
var menu = new YAHOO.widget.Menu( "moreMenu" + oRecord.getData( 'assetId' ), options );
|
||||
YAHOO.util.Event.onDOMReady( function () { menu.render( document.getElementById( 'assetManager' ) ) } );
|
||||
YAHOO.util.Event.onDOMReady( function () { menu.render( document.getElementById( 'assetManager' ) ); } );
|
||||
YAHOO.util.Event.addListener( more, "click", function (e) { YAHOO.util.Event.stopEvent(e); menu.show(); menu.focus(); }, null, menu );
|
||||
};
|
||||
|
||||
|
|
@ -202,8 +199,9 @@ WebGUI.AssetManager.BuildQueryString = function ( state, dt ) {
|
|||
WebGUI.AssetManager.formatRevisionDate = function ( elCell, oRecord, oColumn, orderNumber ) {
|
||||
var revisionDate = new Date( oRecord.getData( "revisionDate" ) * 1000 );
|
||||
var minutes = revisionDate.getMinutes();
|
||||
if (minutes < 10)
|
||||
if (minutes < 10) {
|
||||
minutes = "0" + minutes;
|
||||
}
|
||||
elCell.innerHTML = revisionDate.getFullYear() + '-' + ( revisionDate.getMonth() + 1 )
|
||||
+ '-' + revisionDate.getDate() + ' ' + ( revisionDate.getHours() )
|
||||
+ ':' + minutes
|
||||
|
|
@ -308,7 +306,7 @@ WebGUI.AssetManager.initDataTable = function (o) {
|
|||
WebGUI.AssetManager.DataTable.handleDataReturnPayload = function(oRequest, oResponse, oPayload) {
|
||||
oPayload.totalRecords = oResponse.meta.totalRecords;
|
||||
return oPayload;
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue