begin to i18n the AssetManager. Cannot be backported to 7.5 due to reliance on i18n.js
This commit is contained in:
parent
564b4e90d1
commit
7ba223f854
3 changed files with 27 additions and 6 deletions
|
|
@ -390,13 +390,16 @@ sub www_manage {
|
|||
$session->style->setLink( $session->url->extras('yui/build/paginator/assets/skins/sam/paginator.css'), {rel=>'stylesheet', type=>'text/css'});
|
||||
$session->style->setLink( $session->url->extras('yui/build/datatable/assets/skins/sam/datatable.css'), {rel=>'stylesheet', type=>'text/css'});
|
||||
$session->style->setLink( $session->url->extras('yui/build/menu/assets/skins/sam/menu.css'), {rel=>'stylesheet', type=>'text/css'});
|
||||
$session->style->setLink( $session->url->extras( 'yui-webgui/build/assetManager/assetManager.css' ), { rel => "stylesheet", type => 'text/css' } );
|
||||
$session->style->setLink( $session->url->extras('yui-webgui/build/assetManager/assetManager.css' ), { rel => "stylesheet", type => 'text/css' } );
|
||||
|
||||
$session->style->setScript( $session->url->extras( 'yui/build/utilities/utilities.js' ) );
|
||||
$session->style->setScript( $session->url->extras( 'yui/build/paginator/paginator-min.js ' ) );
|
||||
$session->style->setScript( $session->url->extras( 'yui/build/datasource/datasource-min.js ' ) );
|
||||
$session->style->setScript( $session->url->extras( 'yui/build/datatable/datatable-min.js ' ) );
|
||||
$session->style->setScript( $session->url->extras( 'yui/build/container/container-min.js' ) );
|
||||
$session->style->setScript( $session->url->extras( 'yui/build/menu/menu-min.js' ) );
|
||||
$session->style->setScript( $session->url->extras( 'yui/build/json/json-min.js' ) );
|
||||
$session->style->setScript( $session->url->extras( 'yui-webgui/build/i18n/i18n.js' ) );
|
||||
$session->style->setScript( $session->url->extras( 'yui-webgui/build/assetManager/assetManager.js' ) );
|
||||
$session->style->setScript( $session->url->extras( 'yui-webgui/build/form/form.js' ) );
|
||||
|
||||
|
|
|
|||
|
|
@ -1114,7 +1114,7 @@ Couldn't open %-s because %-s <br />
|
|||
context => q{Message when no assets match search criteria},
|
||||
},
|
||||
|
||||
'menu label' => {
|
||||
'More' => {
|
||||
message => q{More},
|
||||
lastUpdated => 0,
|
||||
context => q{Label for the menu to show actions to perform on an asset},
|
||||
|
|
|
|||
|
|
@ -62,12 +62,12 @@ WebGUI.AssetManager.findRow
|
|||
*/
|
||||
WebGUI.AssetManager.formatActions = function ( elCell, oRecord, oColumn, orderNumber ) {
|
||||
elCell.innerHTML
|
||||
= '<a href="' + WebGUI.AssetManager.appendToUrl(oRecord.getData( 'url' ), 'func=edit;proceed=manageAssets') + '">Edit</a>'
|
||||
= '<a href="' + WebGUI.AssetManager.appendToUrl(oRecord.getData( 'url' ), 'func=edit;proceed=manageAssets') + '">' + WebGUI.AssetManager.i18n.get('Asset', 'edit') + '</a>'
|
||||
+ ' | '
|
||||
;
|
||||
var more = document.createElement( 'a' );
|
||||
elCell.appendChild( more );
|
||||
more.appendChild( document.createTextNode( 'More' ) );
|
||||
more.appendChild( document.createTextNode( WebGUI.AssetManager.i18n.get('Asset','More' ) ) );
|
||||
more.href = '#';
|
||||
|
||||
// Delete the old menu
|
||||
|
|
@ -207,9 +207,28 @@ WebGUI.AssetManager.formatTitle = function ( elCell, oRecord, oColumn, orderNumb
|
|||
|
||||
/*---------------------------------------------------------------------------
|
||||
WebGUI.AssetManager.initManager ( )
|
||||
Initialize the www_manage page
|
||||
Initialize the i18n interface
|
||||
*/
|
||||
WebGUI.AssetManager.initManager = function (o) {
|
||||
WebGUI.AssetManager.i18n
|
||||
= new WebGUI.i18n( {
|
||||
namespaces : {
|
||||
'Asset' : [
|
||||
"edit",
|
||||
"More",
|
||||
]
|
||||
},
|
||||
onpreload : {
|
||||
fn : WebGUI.AssetManager.initDataTable
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
WebGUI.AssetManager.initDataTable ( )
|
||||
Initialize the www_manage page
|
||||
*/
|
||||
WebGUI.AssetManager.initDataTable = function (o) {
|
||||
var assetPaginator = new YAHOO.widget.Paginator({
|
||||
containers : ['pagination'],
|
||||
pageLinks : 7,
|
||||
|
|
@ -330,7 +349,6 @@ WebGUI.AssetManager.initManager = function (o) {
|
|||
// Send the request
|
||||
this.getDataSource().sendRequest(WebGUI.AssetManager.BuildQueryString(newState, this), oCallback);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue