@@ -9,45 +9,45 @@ var ISPConfig = {
99 registeredHooks : new Array ( ) ,
1010 new_tpl_add_id : 0 ,
1111 dataLogTimer : 0 ,
12-
12+
1313 options : {
1414 useLoadIndicator : false ,
1515 useComboBox : false
1616 } ,
17-
17+
1818 setOption : function ( key , value ) {
1919 ISPConfig . options [ key ] = value ;
2020 } ,
21-
21+
2222 setOptions : function ( opts ) {
2323 $ . extend ( ISPConfig . options , opts ) ;
2424 } ,
25-
25+
2626 reportError : function ( request ) {
27-
27+
2828 } ,
29-
29+
3030 registerHook : function ( name , callback ) {
3131 if ( ! ISPConfig . registeredHooks [ name ] ) ISPConfig . registeredHooks [ name ] = new Array ( ) ;
3232 var newindex = ISPConfig . registeredHooks [ name ] . length ;
3333 ISPConfig . registeredHooks [ name ] [ newindex ] = callback ;
3434 } ,
35-
35+
3636 callHook : function ( name , params ) {
3737 if ( ! ISPConfig . registeredHooks [ name ] ) return ;
3838 for ( var i = 0 ; i < ISPConfig . registeredHooks [ name ] . length ; i ++ ) {
3939 var callback = ISPConfig . registeredHooks [ name ] [ i ] ;
4040 callback ( name , params ) ;
4141 }
4242 } ,
43-
43+
4444 resetFormChanged : function ( ) {
4545 ISPConfig . pageFormChanged = false ;
4646 } ,
4747
4848 showLoadIndicator : function ( ) {
4949 document . body . style . cursor = 'wait' ;
50-
50+
5151 if ( ISPConfig . options . useLoadIndicator == true ) {
5252 ISPConfig . requestsRunning += 1 ;
5353
@@ -96,7 +96,7 @@ var ISPConfig = {
9696 onAfterContentLoad : function ( url , data ) {
9797 if ( ! data ) data = '' ;
9898 else data = '&' + data ;
99-
99+
100100 if ( ISPConfig . options . useComboBox == true ) {
101101 $ ( '#pageContent' ) . find ( "select:not(.chosen-select)" ) . select2 ( {
102102 placeholder : '' ,
@@ -119,7 +119,7 @@ var ISPConfig = {
119119 }
120120 } ) ;
121121 }
122-
122+
123123 $ ( 'input[data-input-element="date"]' ) . datetimepicker ( {
124124 'language' : 'en' , // TODO
125125 'todayHighlight' : true ,
@@ -144,18 +144,18 @@ var ISPConfig = {
144144 $ ( this ) . prop ( 'readonly' , true )
145145 . tooltip ( { title : "Click to set" , placement : "left" } ) ;
146146 } ) ;
147- $ ( 'input[type="password"]' ) . on ( 'click focus' , function ( ) {
147+ $ ( 'input[type="password"]' ) . on ( 'click focus' , function ( ) {
148148 $ ( this ) . prop ( 'readonly' , false ) ;
149149 $ ( this ) . tooltip ( 'destroy' ) ;
150150 } ) ;
151-
151+
152152 ISPConfig . callHook ( 'onAfterContentLoad' , { 'url' : url , 'data' : data } ) ;
153153 } ,
154154
155155 submitForm : function ( formname , target , confirmation ) {
156156 var successMessage = arguments [ 3 ] ;
157157 if ( ! confirmation ) confirmation = false ;
158-
158+
159159 if ( ! confirmation || window . confirm ( confirmation ) ) {
160160 var submitFormObj = $ . ajax ( {
161161 type : "POST" ,
@@ -210,12 +210,12 @@ var ISPConfig = {
210210 if ( errormsg ) {
211211 msg = msg + '<div id="errorMsg">' + errormsg + '</div>' ;
212212 }
213-
213+
214214 var csrf_key = $response . find ( 'input[name="_csrf_key"]' ) . val ( ) ;
215215 var csrf_id = $response . find ( 'input[name="_csrf_id"]' ) . val ( ) ;
216-
216+
217217 msg = msg + '<input type="hidden" name="_csrf_id" value="' + csrf_id + '" /><input type="hidden" name="_csrf_key" value="' + csrf_key + '" />' ;
218-
218+
219219 return msg ;
220220
221221 } ;
@@ -264,7 +264,7 @@ var ISPConfig = {
264264 }
265265 } ) ;
266266 } ,
267-
267+
268268 loadContent : function ( pagename ) {
269269 var params = arguments [ 1 ] ;
270270 var pageContentObject2 = $ . ajax ( {
@@ -350,19 +350,19 @@ var ISPConfig = {
350350 ISPConfig . reportError ( 'Ajax Request was not successful. 114' ) ;
351351 }
352352 } ) ;
353-
353+
354354 ISPConfig . loadMenus ( ) ;
355355 ISPConfig . keepalive ( ) ;
356356 ISPConfig . dataLogNotification ( ) ;
357357 setTimeout ( function ( ) {
358358 try {
359359 $ ( 'form#pageForm' ) . find ( 'input[name="username"]' ) . focus ( ) ;
360360 } catch ( e ) {
361-
361+
362362 }
363363 } , 1000 ) ;
364364 } ,
365-
365+
366366 loadMenus : function ( ) {
367367 var sideNavObject = $ . ajax ( {
368368 type : "GET" ,
@@ -409,7 +409,7 @@ var ISPConfig = {
409409 console . log ( 'tab change interrupted, request still running.' ) ;
410410 return false ;
411411 }
412-
412+
413413 document . pageForm . next_tab . value = tab ;
414414
415415 var idel = $ ( 'form#pageForm' ) . find ( '[name="id"]' ) ;
@@ -487,7 +487,7 @@ var ISPConfig = {
487487 }
488488 } ) ;
489489 } ,
490-
490+
491491 keepalive : function ( ) {
492492 var pageContentObject3 = $ . ajax ( {
493493 type : "GET" ,
@@ -618,13 +618,13 @@ $(document).on('click', 'a[data-load-content],button[data-load-content]', functi
618618 console . log ( 'preventing click because there is still a request running.' ) ;
619619 return ;
620620 }
621-
621+
622622 $page . on ( 'scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove' , function ( ) { $page . stop ( ) ; } ) ;
623623 $page . animate ( { scrollTop : 0 } , 1000 , function ( ) { $page . off ( 'scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove' , function ( ) { $page . stop ( ) ; } ) ; } ) ;
624-
624+
625625 var content_to_load = $ ( this ) . attr ( 'data-load-content' ) ;
626626 if ( ! content_to_load ) return this ;
627-
627+
628628 ISPConfig . loadContent ( content_to_load ) ;
629629} ) ;
630630
@@ -634,13 +634,13 @@ $(document).on('click', 'a[data-capp],button[data-capp]', function(e) {
634634 console . log ( 'preventing click because there is still a request running.' ) ;
635635 return ;
636636 }
637-
637+
638638 $page . on ( 'scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove' , function ( ) { $page . stop ( ) ; } ) ;
639639 $page . animate ( { scrollTop : 0 } , 1000 , function ( ) { $page . off ( 'scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove' , function ( ) { $page . stop ( ) ; } ) ; } ) ;
640-
640+
641641 var content_to_load = $ ( this ) . attr ( 'data-capp' ) ;
642642 if ( ! content_to_load ) return this ;
643-
643+
644644 ISPConfig . capp ( content_to_load ) ;
645645} ) ;
646646
@@ -650,14 +650,14 @@ $(document).on('click', 'a[data-submit-form],button[data-submit-form]', function
650650 console . log ( 'preventing click because there is still a request running.' ) ;
651651 return ;
652652 }
653-
653+
654654 $page . on ( 'scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove' , function ( ) { $page . stop ( ) ; } ) ;
655655 $page . animate ( { scrollTop : 0 } , 1000 , function ( ) { $page . off ( 'scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove' , function ( ) { $page . stop ( ) ; } ) ; } ) ;
656-
656+
657657 var $el = $ ( this ) ;
658658 var act = $el . attr ( 'data-form-action' ) ;
659659 var form = $el . attr ( 'data-submit-form' ) ;
660-
660+
661661 if ( $el . attr ( 'data-form-upload' ) == 'true' ) ISPConfig . submitUploadForm ( form , act ) ;
662662 else ISPConfig . submitForm ( form , act ) ;
663663} ) ;
@@ -679,28 +679,28 @@ $(document).on('click', 'th[data-column]', function(e) {
679679 var $self = $ ( this ) ;
680680 var column = $self . attr ( 'data-column' ) ;
681681 if ( ! column ) return this ;
682-
682+
683683 if ( $ ( "#pageForm .table #Filter" ) . length > 0 && $self . attr ( 'data-sortable' ) != 'false' ) {
684684 var $el = $ ( '#Filter' ) ;
685685 var act = $el . attr ( 'data-form-action' ) ;
686686 var form = $el . attr ( 'data-submit-form' ) ;
687-
687+
688688 var dir = $self . attr ( 'data-ordered' ) ;
689-
689+
690690 var separator = '?' ;
691691 if ( act . indexOf ( "?" ) >= 0 ) {
692692 separator = '&' ;
693693 }
694694 act = act + separator + 'orderby=' + column ;
695695 ISPConfig . submitForm ( form , act ) ;
696-
696+
697697 $ ( document ) . ajaxComplete ( function ( ) {
698698 var $self = $ ( '#pageForm .table th[data-column="' + column + '"]' ) ;
699699 $self . parent ( ) . children ( 'th[data-column]' ) . removeAttr ( 'data-ordered' ) ;
700700 if ( dir && dir == 'asc' ) $self . attr ( 'data-ordered' , 'desc' ) ;
701701 else $self . attr ( 'data-ordered' , 'asc' ) ;
702702 } ) ;
703-
703+
704704 }
705705} ) ;
706706
@@ -765,25 +765,23 @@ $(document).on('ready', function () {
765765 } )
766766 }
767767 } ) ;
768-
768+
769769 // Animierter Ladefortschritt
770770 $ ( '.progress .progress-bar' ) . css ( 'width' , function ( ) {
771771 return $ ( this ) . attr ( 'aria-valuenow' ) + '%' ;
772772 } ) ;
773-
774- ISPConfig . loadInitContent ( ) ;
775773
776774 $ ( '#searchform' ) . submit ( function ( e ) {
777775 e . preventDefault ( ) ;
778776 } ) ;
779-
777+
780778 $ ( "#pageForm" ) . submit ( function ( e ) {
781779 //Prevent form submit: e.preventDefault() in lists
782780 if ( $ ( "#pageForm .table #Filter" ) . length > 0 ) {
783781 e . preventDefault ( ) ;
784782 }
785783 } ) ;
786-
784+
787785 $ . fn . setCursorPosition = function ( pos ) {
788786 var self = $ ( this ) . get ( 0 ) ;
789787 if ( self . setSelectionRange ) {
@@ -799,11 +797,11 @@ $(document).on('ready', function () {
799797 range . select ( ) ;
800798 }
801799 } ;
802-
800+
803801 $ . fn . getCursorPosition = function ( ) {
804802 var iCaretPos = 0 ;
805803 var self = $ ( this ) . get ( 0 ) ;
806-
804+
807805 if ( typeof self . selectionStart === 'number' ) {
808806 iCaretPos = self . selectionDirection == 'backward' ? self . selectionStart : self . selectionEnd ;
809807 } else if ( document . selection ) {
@@ -815,4 +813,3 @@ $(document).on('ready', function () {
815813 return iCaretPos ;
816814 } ;
817815} ) ;
818-
0 commit comments