@@ -1198,61 +1198,62 @@ function __p__pe_sm() {
1198
1198
return
1199
1199
}
1200
1200
$ ( ".ui_reset" ) . remove ( ) ;
1201
- var c = $ ( 'textarea[name="data"], textarea[name="text"], textarea[name="directives"], textarea[name="manual"]' ) . parents ( "form" ) ,
1202
- i = c . find ( 'button[type="button"]' ) . length ? c . find ( 'button[type="button"]' ) : c . find ( 'input[type="submit"]' ) ,
1203
- d = '<i class="fa fa-fw fa-floppy-o"> </i>' ,
1201
+ var d = ( __ie__ ( ) > 5 && __ie__ ( ) <= 11 ) ,
1202
+ c = $ ( 'textarea[name="data"], textarea[name="text"], textarea[name="directives"], textarea[name="manual"]' ) . parents ( "form" ) ,
1203
+ j = c . find ( 'button[type="button"]' ) . length ? c . find ( 'button[type="button"]' ) : c . find ( 'input[type="submit"]' ) ,
1204
+ e = '<i class="fa fa-fw fa-floppy-o"> </i>' ,
1204
1205
b = ( $ ( 'textarea[name="directives"]' ) . length ? "-12px" : "0" ) ,
1205
- f = ( $ ( "select" ) . val ( ) ? $ ( "select" ) . val ( ) : ( $ ( ".table-title" ) . text ( ) ? $ ( ".table-title" ) . text ( ) : ( $ ( ".panel-body tt:first" ) . text ( ) ? $ ( ".panel-body tt:first" ) . text ( ) : ( $ ( "#headln2c tt:first" ) . text ( ) ? $ ( "#headln2c tt:first" ) . text ( ) : "" ) ) ) ) ,
1206
- h = '<span class="cspinner_container" style="position: absolute; width: 18px; height: 14px; display: inline-block;"><span class="cspinner" style="margin-top: -0.5px; margin-left: -28px;"><span class="cspinner-icon white small"></span></span></span>' ,
1207
- g = '<span class="cspinner_container" style="position: absolute; width: 18px; height: 14px; display: inline-block;"><span class="cspinner" style="margin-top: -0.5px; margin-left: -28px;"><span class="cspinner-icon dark small"></span></span></span>' ;
1208
- i . parents ( "table.ui_form_end_buttons" ) . prev ( "br" ) . remove ( ) ;
1209
- i . parents ( "table.ui_form_end_buttons" ) . prev ( "div.table-responsive" ) . attr ( "style" , "margin-bottom: -4px !important" ) ;
1210
- i . replaceWith ( ' <span class="btn-group" style="margin-top: ' + b + '"> <button type="button" class="btn btn-success btn-34 margined-top-5" data-form="submitter" data-form-onbeforeunload="0">' + d + lang ( "theme_xhred_global_save" ) + ' </button> <button type="submit" class="btn btn-default btn-34 margined-top-5"><i class="fa fa-fw fa-arrow-circle-o-left"> </i>' + lang ( "theme_xhred_global_save_and_close" ) + " </button> </span> " ) ;
1206
+ g = ( $ ( "select" ) . val ( ) ? $ ( "select" ) . val ( ) : ( $ ( ".table-title" ) . text ( ) ? $ ( ".table-title" ) . text ( ) : ( $ ( ".panel-body tt:first" ) . text ( ) ? $ ( ".panel-body tt:first" ) . text ( ) : ( $ ( "#headln2c tt:first" ) . text ( ) ? $ ( "#headln2c tt:first" ) . text ( ) : "" ) ) ) ) ,
1207
+ i = '<span class="cspinner_container" style="position: absolute; width: 18px; height: 14px; display: inline-block;"><span class="cspinner" style="margin-top: -0.5px; margin-left: -28px;"><span class="cspinner-icon white small"></span></span></span>' ,
1208
+ h = '<span class="cspinner_container" style="position: absolute; width: 18px; height: 14px; display: ' + ( d ? "none" : " inline-block;" ) + ' "><span class="cspinner" style="margin-top: -0.5px; margin-left: -28px;"><span class="cspinner-icon dark small"></span></span></span>';
1209
+ j . parents ( "table.ui_form_end_buttons" ) . prev ( "br" ) . remove ( ) ;
1210
+ j . parents ( "table.ui_form_end_buttons" ) . prev ( "div.table-responsive" ) . attr ( "style" , "margin-bottom: -4px !important" ) ;
1211
+ j . replaceWith ( ' <span class="btn-group" style="margin-top: ' + b + '"> <button type="button" class="btn btn-success btn-34 margined-top-5' + ( d ? " hidden" : "" ) + '" data-form="submitter" data-form-onbeforeunload="0">' + e + lang ( "theme_xhred_global_save" ) + ' </button> <button type="submit" class="btn btn-' + ( d ? "success" : " default" ) + ' btn-34 margined-top-5"><i class="fa fa-fw fa-arrow-circle-o-left"> </i>' + lang ( "theme_xhred_global_save_and_close" ) + " </button> </span> " ) ;
1211
1212
var a = $ ( 'button[type="button"]:not(.ui_form_end_submit)' ) ,
1212
- e = $ ( 'button[type="submit"]:not(.ui_form_end_submit)' ) ;
1213
- window . __cm_editor_static . on ( "change" , function ( k , j ) {
1213
+ f = $ ( 'button[type="submit"]:not(.ui_form_end_submit)' ) ;
1214
+ window . __cm_editor_static . on ( "change" , function ( l , k ) {
1214
1215
__cm_editor_static . save ( ) ;
1215
1216
a . addClass ( "btn-warning" ) . removeClass ( "btn-success" ) . attr ( "data-form-onbeforeunload" , 1 )
1216
1217
} ) ;
1217
- $ ( "body" ) . on ( "keydown" , function ( j ) {
1218
- if ( j . keyCode == 13 && j . ctrlKey && ! j . shiftKey ) {
1218
+ $ ( "body" ) . on ( "keydown" , function ( k ) {
1219
+ if ( k . keyCode == 13 && k . ctrlKey && ! k . shiftKey ) {
1219
1220
a . trigger ( "click" )
1220
1221
} else {
1221
- if ( j . keyCode == 13 && j . ctrlKey && j . shiftKey ) {
1222
- e . trigger ( "click" )
1222
+ if ( k . keyCode == 13 && k . ctrlKey && k . shiftKey ) {
1223
+ f . trigger ( "click" )
1223
1224
}
1224
1225
}
1225
1226
} ) ;
1226
- $ ( "body" ) . on ( "click" , 'button[type="submit"]:not(.disabled)' , function ( j ) {
1227
- $ ( "button" ) . addClass ( "disabled" ) . find ( ".fa.fa-arrow-circle-o-left" ) . addClass ( " invisible") . after ( g ) ;
1227
+ $ ( "body" ) . on ( "click" , 'button[type="submit"]:not(.disabled)' , function ( k ) {
1228
+ $ ( "button" ) . addClass ( "disabled" ) . find ( ".fa.fa-arrow-circle-o-left" ) . addClass ( ( d ? "visible" : " invisible") ) . after ( h ) ;
1228
1229
a . attr ( "data-form-onbeforeunload" , 0 )
1229
1230
} ) ;
1230
- $ ( "body" ) . on ( "click" , 'button[data-form="submitter"]:not(.disabled)' , function ( l ) {
1231
- l . preventDefault ( ) ;
1232
- var k = $ ( this ) ,
1233
- m = ( k . parents ( "form" ) . attr ( "enctype" ) && k . parents ( "form" ) . attr ( "enctype" ) . indexOf ( "form-data" ) > - 1 ? 0 : 1 ) ,
1234
- j = ( m ? k . parents ( "form" ) . serialize ( ) : ( new FormData ( k . parents ( "form" ) [ 0 ] ) ) ) ;
1235
- $ ( "button" ) . addClass ( "disabled" ) . find ( ".fa.fa-floppy-o" ) . addClass ( "invisible" ) . after ( h ) ;
1231
+ $ ( "body" ) . on ( "click" , 'button[data-form="submitter"]:not(.disabled)' , function ( m ) {
1232
+ m . preventDefault ( ) ;
1233
+ var l = $ ( this ) ,
1234
+ n = ( l . parents ( "form" ) . attr ( "enctype" ) && l . parents ( "form" ) . attr ( "enctype" ) . indexOf ( "form-data" ) > - 1 ? 0 : 1 ) ,
1235
+ k = ( n ? l . parents ( "form" ) . serialize ( ) : ( new FormData ( l . parents ( "form" ) [ 0 ] ) ) ) ;
1236
+ $ ( "button" ) . addClass ( "disabled" ) . find ( ".fa.fa-floppy-o" ) . addClass ( "invisible" ) . after ( i ) ;
1236
1237
setTimeout ( function ( ) {
1237
1238
$ . ajax ( {
1238
1239
type : "POST" ,
1239
1240
url : $__current_directory + c . attr ( "action" ) ,
1240
- data : j ,
1241
+ data : k ,
1241
1242
dataType : "text" ,
1242
1243
cache : false ,
1243
1244
contentType : false ,
1244
1245
processData : false ,
1245
- success : function ( n ) {
1246
+ success : function ( o ) {
1246
1247
a . removeClass ( "btn-warning" ) . addClass ( "btn-success" ) . attr ( "data-form-onbeforeunload" , 0 ) ;
1247
1248
$ ( "button" ) . removeClass ( "disabled" ) . find ( ".fa" ) . removeClass ( "invisible" ) . parent ( ) . find ( ".cspinner_container" ) . remove ( ) ;
1248
- if ( $ ( n ) . find ( ".panel-body > hr + h3" ) . length ) {
1249
- messenger ( '<i class="fa fa-lg fa-fw fa-exclamation-triangle"></i>' + $ ( n ) . find ( ".panel-body hr + h3" ) . html ( ) , 60 , "error" , "magic_save_error" ) ;
1249
+ if ( $ ( o ) . find ( ".panel-body > hr + h3" ) . length ) {
1250
+ messenger ( '<i class="fa fa-lg fa-fw fa-exclamation-triangle"></i>' + $ ( o ) . find ( ".panel-body hr + h3" ) . html ( ) , 60 , "error" , "magic_save_error" ) ;
1250
1251
a . removeClass ( "btn-success" ) . addClass ( "btn-warning" ) . attr ( "data-form-onbeforeunload" , 1 ) ;
1251
1252
return
1252
1253
}
1253
- messenger ( '<i class="fa fa-fw fa-check-circle"></i>' + lang ( "theme_xhred_filemanager_file_saved" ) . replace ( "%value" , f ) , 3 , "success" )
1254
+ messenger ( '<i class="fa fa-fw fa-check-circle"></i>' + lang ( "theme_xhred_filemanager_file_saved" ) . replace ( "%value" , g ) , 3 , "success" )
1254
1255
} ,
1255
- error : function ( n ) { }
1256
+ error : function ( o ) { }
1256
1257
} )
1257
1258
} , 300 )
1258
1259
} )
0 commit comments