New extension pattern
This commit is contained in:
parent
cc01b5af4e
commit
569a52ca21
@ -174,7 +174,7 @@ define([
|
||||
}
|
||||
// Remove sync attributes
|
||||
localStorage.removeItem(syncAttributes.syncIndex);
|
||||
fileDesc.syncLocations.removeItem(syncIndex);
|
||||
fileDesc.syncLocations.removeItem(syncAttributes.syncIndex);
|
||||
if(!skipExtensions) {
|
||||
extensionMgr.onSyncRemoved(fileDesc, syncAttributes);
|
||||
}
|
||||
@ -218,7 +218,7 @@ define([
|
||||
}
|
||||
// Remove publish attributes
|
||||
localStorage.removeItem(publishAttributes.publishIndex);
|
||||
fileDesc.publishLocations.removeItem(publishIndex);
|
||||
fileDesc.publishLocations.removeItem(publishAttributes.publishIndex);
|
||||
if(!skipExtensions) {
|
||||
extensionMgr.onPublishRemoved(fileDesc, publishAttributes);
|
||||
}
|
||||
|
@ -89,8 +89,7 @@ define([
|
||||
var content = getPublishContent(publishAttributes);
|
||||
|
||||
// Call the provider
|
||||
var provider = providerMap[publishAttributes.provider];
|
||||
provider.publish(publishAttributes, publishTitle, content, function(error) {
|
||||
publishAttributes.provider.publish(publishAttributes, publishTitle, content, function(error) {
|
||||
if(error !== undefined) {
|
||||
var errorMsg = error.toString();
|
||||
if(errorMsg.indexOf("|removePublish") !== -1) {
|
||||
|
@ -73,7 +73,7 @@ define([
|
||||
}
|
||||
if(uploadFlag) {
|
||||
// Update syncAttributes in localStorage
|
||||
localStorage[syncIndex] = utils.serializeAttributes(syncAttributes);
|
||||
localStorage[syncAttributes.syncIndex] = utils.serializeAttributes(syncAttributes);
|
||||
}
|
||||
locationUp(callback);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user