Browse Source

Evolution #357: Maj interface d'ajout

Sevajol Bastien 12 years ago
parent
commit
926f5842b1
2 changed files with 22 additions and 7 deletions
  1. 12 7
      web/bundles/muzichcore/js/muzich.js
  2. 10 0
      web/bundles/muzichhome/js/home.js

+ 12 - 7
web/bundles/muzichcore/js/muzich.js View File

@@ -1273,19 +1273,24 @@ $(document).ready(function(){
1273 1273
     
1274 1274
     if (element_add_proceed_json_response(response))
1275 1275
     { 
1276
-      $('div#element_add_box').slideUp();
1277
-      $('div#form_add_first_part').show();
1278
-      $('div#form_add_second_part').hide();
1279
-      $('ul#form_add_prop_tags').hide();
1280
-      $('ul#form_add_prop_tags_text').hide();
1281
-      $('input#element_add_url').val('');
1282
-      $('input#element_add_name').val('');
1276
+      form_add_reinit();
1283 1277
     }
1284 1278
 
1285 1279
     
1286 1280
     return false;
1287 1281
   });
1288 1282
   
1283
+  
1284
+  function form_add_reinit()
1285
+  {
1286
+    $('div#element_add_box').slideUp();
1287
+    $('div#form_add_first_part').show();
1288
+    $('div#form_add_second_part').hide();
1289
+    $('ul#form_add_prop_tags').hide();
1290
+    $('ul#form_add_prop_tags_text').hide();
1291
+    $('input#element_add_url').val('');
1292
+    $('input#element_add_name').val('');
1293
+  }
1289 1294
 
1290 1295
  /////////////////////
1291 1296
  var tags_ids_for_filter = new Array();

+ 10 - 0
web/bundles/muzichhome/js/home.js View File

@@ -13,6 +13,16 @@ $(document).ready(function(){
13 13
      $('#element_add_box').slideUp("slow");
14 14
      $('#element_add_link').show();
15 15
      $('form[name="search"]').slideDown();
16
+     //form_add_reinit();
17
+     // copie du contenu de la fonction ci dessus, arrive pas a l'appeler ... huh
18
+     $('div#element_add_box').slideUp();
19
+    $('div#form_add_first_part').show();
20
+    $('div#form_add_second_part').hide();
21
+    $('ul#form_add_prop_tags').hide();
22
+    $('ul#form_add_prop_tags_text').hide();
23
+    $('input#element_add_url').val('');
24
+    $('input#element_add_name').val('');
25
+     
16 26
      return false;
17 27
    }); 
18 28