Remove duplicated definition and move OC.msg to js/js.js
Fix issue #7166
This commit is contained in:
parent
8387cd8ae3
commit
fdb0d2067f
|
@ -7,28 +7,6 @@
|
||||||
* See the COPYING-README file.
|
* See the COPYING-README file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
OC.msg={
|
|
||||||
startSaving:function(selector){
|
|
||||||
$(selector)
|
|
||||||
.html( t('settings', 'Saving...') )
|
|
||||||
.removeClass('success')
|
|
||||||
.removeClass('error')
|
|
||||||
.stop(true, true)
|
|
||||||
.show();
|
|
||||||
},
|
|
||||||
finishedSaving:function(selector, data){
|
|
||||||
if( data.status === "success" ){
|
|
||||||
$(selector).html( data.data.message )
|
|
||||||
.addClass('success')
|
|
||||||
.stop(true, true)
|
|
||||||
.delay(3000)
|
|
||||||
.fadeOut(900);
|
|
||||||
}else{
|
|
||||||
$(selector).html( data.data.message ).addClass('error');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
// Trigger ajax on recoveryAdmin status change
|
// Trigger ajax on recoveryAdmin status change
|
||||||
var enabledStatus = $('#adminEnableRecovery').val();
|
var enabledStatus = $('#adminEnableRecovery').val();
|
||||||
|
|
|
@ -467,6 +467,34 @@ OC.search.lastResults={};
|
||||||
OC.addStyle.loaded=[];
|
OC.addStyle.loaded=[];
|
||||||
OC.addScript.loaded=[];
|
OC.addScript.loaded=[];
|
||||||
|
|
||||||
|
OC.msg={
|
||||||
|
startSaving:function(selector, message){
|
||||||
|
OC.msg.startAction(selector, t('settings', 'Saving...'));
|
||||||
|
},
|
||||||
|
finishedSaving:function(selector, data){
|
||||||
|
OC.msg.finishedAction(selector, data);
|
||||||
|
},
|
||||||
|
startAction:function(selector, message){
|
||||||
|
$(selector)
|
||||||
|
.html( message )
|
||||||
|
.removeClass('success')
|
||||||
|
.removeClass('error')
|
||||||
|
.stop(true, true)
|
||||||
|
.show();
|
||||||
|
},
|
||||||
|
finishedAction:function(selector, data){
|
||||||
|
if( data.status === "success" ){
|
||||||
|
$(selector).html( data.data.message )
|
||||||
|
.addClass('success')
|
||||||
|
.stop(true, true)
|
||||||
|
.delay(3000)
|
||||||
|
.fadeOut(900);
|
||||||
|
}else{
|
||||||
|
$(selector).html( data.data.message ).addClass('error');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
OC.Notification={
|
OC.Notification={
|
||||||
queuedNotifications: [],
|
queuedNotifications: [],
|
||||||
getDefaultNotificationFunction: null,
|
getDefaultNotificationFunction: null,
|
||||||
|
|
|
@ -51,25 +51,3 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
OC.msg={
|
|
||||||
startSaving:function(selector){
|
|
||||||
$(selector)
|
|
||||||
.html( t('settings', 'Saving...') )
|
|
||||||
.removeClass('success')
|
|
||||||
.removeClass('error')
|
|
||||||
.stop(true, true)
|
|
||||||
.show();
|
|
||||||
},
|
|
||||||
finishedSaving:function(selector, data){
|
|
||||||
if( data.status === "success" ){
|
|
||||||
$(selector).html( data.data.message )
|
|
||||||
.addClass('success')
|
|
||||||
.stop(true, true)
|
|
||||||
.delay(3000)
|
|
||||||
.fadeOut(900);
|
|
||||||
}else{
|
|
||||||
$(selector).html( data.data.message ).addClass('error');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
|
@ -313,25 +313,3 @@ OC.Encryption.msg={
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
OC.msg={
|
|
||||||
startSaving:function(selector){
|
|
||||||
$(selector)
|
|
||||||
.html( t('settings', 'Saving...') )
|
|
||||||
.removeClass('success')
|
|
||||||
.removeClass('error')
|
|
||||||
.stop(true, true)
|
|
||||||
.show();
|
|
||||||
},
|
|
||||||
finishedSaving:function(selector, data){
|
|
||||||
if( data.status === "success" ){
|
|
||||||
$(selector).html( data.data.message )
|
|
||||||
.addClass('success')
|
|
||||||
.stop(true, true)
|
|
||||||
.delay(3000)
|
|
||||||
.fadeOut(900);
|
|
||||||
}else{
|
|
||||||
$(selector).html( data.data.message ).addClass('error');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
Loading…
Reference in New Issue