add showView method to open a url in the view tab
This commit is contained in:
parent
393520688b
commit
d61e1b1c5f
1 changed files with 20 additions and 9 deletions
|
|
@ -163,15 +163,7 @@ appendToUrl
|
|||
*/
|
||||
WebGUI.Admin.prototype.editAsset
|
||||
= function ( url ) {
|
||||
// Show the view tab
|
||||
this.tabBar.selectTab( 0 );
|
||||
this.currentTab = "view";
|
||||
|
||||
// Open the edit form
|
||||
window.frames["view"].location.href = appendToUrl( url, "func=edit" );
|
||||
|
||||
// Mark undirty, as we'll clean it ourselves
|
||||
this.viewDirty = 0;
|
||||
this.showView( appendToUrl( url, "func=edit" ) );
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -191,6 +183,25 @@ WebGUI.Admin.prototype.gotoAsset
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* showView ( [url] )
|
||||
* Open the view tab, optionally navigating to the given URL
|
||||
*/
|
||||
WebGUI.Admin.prototype.showView
|
||||
= function (url) {
|
||||
// Show the view tab
|
||||
this.tabBar.selectTab( 0 );
|
||||
this.currentTab = "view";
|
||||
|
||||
if ( url ) {
|
||||
// Open the URL
|
||||
window.frames["view"].location.href = url;
|
||||
|
||||
// Mark undirty, as we'll clean it ourselves
|
||||
this.viewDirty = 0;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* makeEditAsset( url )
|
||||
* Create a callback to edit an asset. Use when attaching to event listeners
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue