@@ -77,15 +77,7 @@ $(function() {
7777 } ) ;
7878
7979 if ( location . pathname . indexOf ( "helpdesk.public.php" ) != - 1 ) {
80- $ ( '.ui-tabs-panel:visible' ) . ready ( function ( ) {
81- showHomepageFormList ( ) ;
82- } ) ;
83-
84- $ ( '#tabspanel + div.ui-tabs' ) . on ( "tabsload" , function ( event , ui ) {
85- showHomepageFormList ( ) ;
86- } ) ;
87-
88- showHomepageFormList ( ) ;
80+ plugin_formcreator . showHomepageFormList ( ) ;
8981
9082 } else if ( $ ( '#plugin_formcreator_wizard_categories' ) . length > 0 ) {
9183 updateCategoriesView ( ) ;
@@ -149,20 +141,6 @@ $(function() {
149141 }
150142} ) ;
151143
152- function showHomepageFormList ( ) {
153- if ( $ ( '#plugin_formcreatorHomepageForms' ) . length ) {
154- return ;
155- }
156-
157- $ . get ( {
158- url : formcreatorRootDoc + '/ajax/homepage_forms.php' ,
159- } ) . done ( function ( response ) {
160- if ( ! $ ( '#plugin_formcreatorHomepageForms' ) . length ) {
161- $ ( '.central > tbody:first' ) . first ( ) . prepend ( response ) ;
162- }
163- } ) ;
164- }
165-
166144function updateCategoriesView ( ) {
167145 $ . post ( {
168146 url : formcreatorRootDoc + '/ajax/homepage_wizard.php' ,
@@ -509,6 +487,21 @@ var plugin_formcreator = new function() {
509487 this . questionsColumns = 4 ; // @see PluginFormcreatorSection::COLUMNS
510488 this . dirty = false ;
511489
490+
491+ this . showHomepageFormList = function ( ) {
492+ if ( $ ( '#plugin_formcreatorHomepageForms' ) . length ) {
493+ return ;
494+ }
495+
496+ $ . get ( {
497+ url : formcreatorRootDoc + '/ajax/homepage_forms.php' ,
498+ } ) . done ( function ( response ) {
499+ // $('.central').first().prepend(response);
500+ var card = $ ( response ) ;
501+ $ ( 'table.central' ) . append ( card )
502+ } ) ;
503+ }
504+
512505 this . setupGridStack = function ( group ) {
513506 var that = this ;
514507 group . gridstack
0 commit comments