Better integration of Fork into AssetHelpers, fork startup
This commit is contained in:
parent
bb8753cd2a
commit
a4edea1e3c
12 changed files with 162 additions and 160 deletions
|
|
@ -3,14 +3,24 @@
|
|||
|
||||
(function () {
|
||||
var ns = YAHOO.namespace('WebGUI.Fork');
|
||||
ns.redirect = function (redir, after) {
|
||||
if (!redir) {
|
||||
return;
|
||||
ns.redirect = function (params, after) {
|
||||
var redir, msg, admin, fn;
|
||||
if (redir = params.redirect) {
|
||||
fn = function () {
|
||||
// The idea here is to only allow local redirects
|
||||
var loc = window.location;
|
||||
loc.href = loc.protocol + '//' + loc.host + redir;
|
||||
};
|
||||
}
|
||||
else if (msg = params.message) {
|
||||
fn = function () {
|
||||
admin = window.parent.admin;
|
||||
admin.processPlugin({ message: msg });
|
||||
admin.closeModalDialog();
|
||||
};
|
||||
}
|
||||
if (fn) {
|
||||
setTimeout(fn, after || 1000);
|
||||
}
|
||||
setTimeout(function() {
|
||||
// The idea here is to only allow local redirects
|
||||
var loc = window.location;
|
||||
loc.href = loc.protocol + '//' + loc.host + redir;
|
||||
}, after || 1000);
|
||||
};
|
||||
}());
|
||||
|
|
|
|||
|
|
@ -354,7 +354,8 @@ WebGUI.Admin.prototype.addPasteHandler
|
|||
*/
|
||||
WebGUI.Admin.prototype.pasteAsset
|
||||
= function ( id ) {
|
||||
var url = appendToUrl( this.currentAssetDef.url, 'func=paste;assetId=' + id );
|
||||
var url = appendToUrl( this.currentAssetDef.url, 'func=pasteList&assetId=' + id );
|
||||
console.log(url);
|
||||
this.gotoAsset( url );
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue