From 8906c3f28a3fcc2209d659625860cc6d370bfdb2 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Tue, 19 Apr 2011 14:01:25 -0500 Subject: [PATCH] className is the full class name. type is the i18n name --- lib/WebGUI/Admin.pm | 3 ++- www/extras/admin/admin.js | 18 +++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/WebGUI/Admin.pm b/lib/WebGUI/Admin.pm index adf9df585..1ae6267ec 100644 --- a/lib/WebGUI/Admin.pm +++ b/lib/WebGUI/Admin.pm @@ -145,7 +145,8 @@ sub getAssetData { canEdit => $asset->canEdit && $asset->canEditIfLocked, helpers => $asset->getHelpers, icon => $asset->getIcon("small"), - className => $asset->getName, + type => $asset->getName, + className => $asset->className, revisions => [ $asset->getRevisionDates ], ); diff --git a/www/extras/admin/admin.js b/www/extras/admin/admin.js index 8d3443be6..2aa28406c 100644 --- a/www/extras/admin/admin.js +++ b/www/extras/admin/admin.js @@ -520,7 +520,7 @@ WebGUI.Admin.prototype.updateAssetHelpers = function ( assetDef ) { var typeEl = document.getElementById( 'helper_asset_name' ); typeEl.style.backgroundImage = 'url(' + assetDef.icon + ')'; - typeEl.innerHTML = assetDef.className; + typeEl.innerHTML = assetDef.type; // Clear old helpers var helperEl = document.getElementById( 'helper_list' ); @@ -1328,7 +1328,7 @@ WebGUI.Admin.AssetTable { key: 'canEdit' }, { key: 'helpers' }, { key: 'title' }, - { key: 'className' }, + { key: 'type' }, { key: 'revisionDate' }, { key: 'assetSize' }, { key: 'lockedBy' }, @@ -1362,10 +1362,10 @@ WebGUI.Admin.AssetTable sortable: true }, { - key: 'className', + key: 'type', label: window.admin.i18n.get('Asset','type'), sortable: true, - formatter: bind( this, this.formatClassName ) + formatter: bind( this, this.formatType ) }, { key: 'revisionDate', @@ -1476,13 +1476,13 @@ WebGUI.Admin.AssetTable.prototype.formatAssetSize }; /** - * formatClassName ( ) + * formatType ( ) * Format the asset class name */ -WebGUI.Admin.AssetTable.prototype.formatClassName +WebGUI.Admin.AssetTable.prototype.formatType = function ( elCell, oRecord, oColumn, orderNumber ) { elCell.innerHTML = ' ' - + oRecord.getData( "className" ); + + oRecord.getData( "type" ); }; /** @@ -2538,7 +2538,7 @@ WebGUI.Admin.Search.prototype.addFilter filter.dataSource.responseType = YAHOO.util.XHRDataSource.TYPE_JSON; filter.dataSource.responseSchema = { resultsList : "results", - fields : [ 'className', 'title', 'icon' ] + fields : [ 'type', 'title', 'icon' ] }; createAutocomplete( li, filter ); @@ -2546,7 +2546,7 @@ WebGUI.Admin.Search.prototype.addFilter filter.autocomplete.formatResult = function ( result, query, match ) { return '
' + '
' + result.name + "
" - + '
' + result.className + '
'; + + '
' + result.type + '
'; };